tour icon indicating copy to clipboard operation
tour copied to clipboard

tour: use general verbs for proper printing

Open Pulko opened this issue 1 year ago • 0 comments

Context: https://go.dev/tour/basics/14

This following piece of code does not use printing verbs, therefore it could be confusing for user to understand what does the v mean in function output.

func main() {
	v := 42 // change me!
	fmt.Printf("v is of type %T\n", v)
}

Suggestion:

func main() {
	v := 42 // change me!
	fmt.Printf("%v is of type %T\n", v, v)
}

Pulko avatar Dec 20 '23 21:12 Pulko