3 ms·
One solution to the fmt.Println problem is not to use it at all. There's a built in println function that works alright for debugging messages and requires no i
by aston 14y ago
One solution to the fmt.Println problem is not to use it at all. There's a built in println function that works alright for debugging messages and requires no import.
http://play.golang.org/p/y5XX4RDTW5 http://play.golang.org/p/y5XX4RDTW5
- afandian 14y agoThank you! I have this problem and find it immensely frustrating. Not frustrating enough to write a blog post and post it to HN. Glad they did.
- minikomi 14y agoThis is also an option: http://play.golang.org/p/qJ5vSnPzb3 http://play.golang.org/p/qJ5vSnPzb3
- swdunlop 14y agofmt.Println has better support for slices, interfaces and pointers; println is deliberately more minimal since it is a builtin.