Go Printing to Stdout and Stderr

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Bootstrapping Functions

Both print() and println() are pre-declared functions, ready to use without any import.

print()

println()

func main() {
  println("something")
}

fmt.Printf()

import "fmt"

// ...
fmt.Printf("something")

Format Strings

fmt.Printf("Hello %s", "Bob")