Skip to content

Conversation

@110y
Copy link
Contributor

@110y 110y commented Jun 25, 2023

…f completion candidates for unimported packages configurable
fmt.Fprintf(out, "\t\tvar params %s\n", nm)
fmt.Fprintf(out, "\t\tif err := json.Unmarshal(r.Params(), &params); err != nil {\n")
fmt.Fprintf(out, "\t\tdecoder := json.NewDecoder(bytes.NewReader(r.Params()))\n")
fmt.Fprintf(out, "\t\tdecoder.UseNumber()\n")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed because the default json.Unmarshal treats a number as a float type.

@gopherbot
Copy link
Contributor

This PR (HEAD: d39db52) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/505995 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants