Go Package fmt: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 15: Line 15:
Prints according to a format specifier. Format specifier documentation https://golang.org/pkg/fmt
Prints according to a format specifier. Format specifier documentation https://golang.org/pkg/fmt


===Printing Pointer Values===
===Pointers===


<pre>
<pre>
fmt.Printf("%p\n", sPtr)
fmt.Printf("%p\n", sPtr)
</pre>
===Ints===
<pre>
fmt.Printf("%d\n",i)
</pre>
</pre>


==<tt>fmt.Scanf()</tt>==
==<tt>fmt.Scanf()</tt>==

Revision as of 20:38, 2 April 2016

External

Internal

fmt Package Functions

fmt.Println()

fmt.Printf()

Prints according to a format specifier. Format specifier documentation https://golang.org/pkg/fmt

Pointers

fmt.Printf("%p\n", sPtr)

Ints

fmt.Printf("%d\n",i)

fmt.Scanf()