Go Printing to Stdout and Stderr: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 2: Line 2:
* [[Go_Language#Printing|Go Language]]
* [[Go_Language#Printing|Go Language]]
* [[Go Code Examples#Code_Examples|Go Code Examples]]
* [[Go Code Examples#Code_Examples|Go Code Examples]]
=<tt>println()</tt>=
<syntaxhighlight lang='go'>
func main() {
  println("something")
}
</syntaxhighlight>
=<tt>fmt.Printf()</tt>=
<syntaxhighlight lang='go'>
import "fmt"
func main() {
  fmt.Printf("something")
}
</syntaxhighlight>

Revision as of 23:19, 18 August 2023

Internal

println()

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

fmt.Printf()

import "fmt"
func main() {
  fmt.Printf("something")
}