Open
Description
Proposal Details
#32479 added a go vet warning for string(i)
, because it has the surprising behavior of returning the character with that integer code, as opposed to doing what strconv.Itoa
does.
There is another similar case, where someone uses the %q
format verb like so:
fmt.Printf("%q", 123) // prints '{'
Consequently, it would be helpful if go vet also warned about using %q
with an integer type that does not implement error
, fmt.Stringer
, or fmt.Formatter
.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Incoming