Use of [1:] in fmt.Println
#76
-
Hey, I just wanted to first and foremost thank you for the amazing code that you wrote. This has been my de-facto north star when creating a Go project myself. I do have a question though! 1: What is the point of adding Cheers :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It's to remove the leading newline used to make the output line up nicely in the Go code...unlike this: fmt.Println(`Manage WTF dials you own or are a member of.
Usage:
wtf dial <command> [arguments]
The commands are:
list list all available dials
create create a new dial
delete remove an existing dial
members view list of members of a dial
set set your WTF level for a dial
`) |
Beta Was this translation helpful? Give feedback.
It's to remove the leading newline used to make the output line up nicely in the Go code...unlike this: