Go Printing to Stdout and Stderr: Difference between revisions
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
==<tt>print()</tt>== | ==<tt>print()</tt>== | ||
=<tt>println()</tt>= | ==<tt>println()</tt>== | ||
<syntaxhighlight lang='go'> | <syntaxhighlight lang='go'> | ||
func main() { | func main() { | ||
Line 11: | Line 11: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=<tt>fmt.Printf()</tt>= | =<tt>fmt.Printf()</tt>= | ||
<syntaxhighlight lang='go'> | <syntaxhighlight lang='go'> |
Revision as of 00:12, 19 August 2023
Internal
Bootstrapping Functions
print()
println()
func main() {
println("something")
}
fmt.Printf()
import "fmt"
// ...
fmt.Printf("something")
Format Strings
fmt.Printf("Hello %s", "Bob")