Use of [1:] in fmt.Println
#76
Answered
by
moorereason
ddritzenhoff
asked this question in
Q&A
|
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 :) |
Answered by
moorereason
Dec 19, 2022
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
`) |
0 replies
Answer selected by
benbjohnson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's to remove the leading newline used to make the output line up nicely in the Go code...unlike this: