Skip to content

Use of [1:] in fmt.Println #76

Answered by moorereason
ddritzenhoff asked this question in Q&A
Discussion options

You must be logged in to vote

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
`)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by benbjohnson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants