Go Package fmt: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 22: Line 22:
==<tt><span id='fmt.Errorf.28.29'></span>Errorf()</tt>==
==<tt><span id='fmt.Errorf.28.29'></span>Errorf()</tt>==
{{Internal|Go_Language_Error_Handling#Wrapping_Errors|Error Handling &#124; Wrapping Errors}}
{{Internal|Go_Language_Error_Handling#Wrapping_Errors|Error Handling &#124; Wrapping Errors}}
=Interfaces=

Revision as of 20:28, 15 December 2023

External

Internal

Functions

Sprintf()

Format a string and returns it as a result:

message := fmt.Sprintf("Hi, %v. Welcome!", name)

For more details on the format string, see:

Printf() Format String

Printf(), Println()

Printing to stdout and stderr

Scanf(), Scanln()

Handling stdin in Go

Errorf()

Error Handling | Wrapping Errors

Interfaces