Skip to content

Glossary: Go Basics

Println and Printf

Also written: Println, Print, fmt.Println, fmt.Print, Printf, fmt.Printf, Sprintf, fmt.Sprintf

`fmt.Println` prints values followed by a new line, and `fmt.Printf` slots values into verbs and doesn't end the line itself. `Sprintf` works like `Printf` but returns the string instead of printing it.

Where the book teaches it