Skip to content

Instantly share code, notes, and snippets.

@nikolaydubina
Created April 2, 2022 01:05
Show Gist options
  • Save nikolaydubina/17102cadf9052911defeb483b32d9130 to your computer and use it in GitHub Desktop.
Save nikolaydubina/17102cadf9052911defeb483b32d9130 to your computer and use it in GitHub Desktop.
// format string slice strings with whitespace can collide 🤪
// https://go.dev/play/p/EqnE9ZWHcjh
package main
import "fmt"
func main() {
fmt.Printf("%v\n", []string{"a b", "c"})
fmt.Printf("%v\n", []string{"a", "b", "c"})
fmt.Printf("%#v\n", []string{"a b", "c"})
fmt.Printf("%#v\n", []string{"a", "b", "c"})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment