Go Package fmt: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 16: Line 16:
* <tt>[https://golang.org/pkg/fmt/#Errorf fmt.Errorf()]</tt>
* <tt>[https://golang.org/pkg/fmt/#Errorf fmt.Errorf()]</tt>


<tt>Errorf</tt> formats according to a format specifier and returns the string as a value that satisfies <tt>error</tt>. For more on error handling see [[Go_Concepts_-_Error_Handling#Creating_Custom_error_Instances|error handling]].
<tt>Errorf</tt> formats according to a format specifier and returns the string as a value that satisfies <tt>error</tt>. For more on error handling see [[Go_Language_Error_Handling#Creating_Custom_error_Instances|error handling]].

Revision as of 22:34, 30 August 2023

External

Internal

Functions

fmt.Printf(), fmt.Println()

Printing to stdout and stderr

fmt.Scanf(), fmt.Scanln()

Handling stdin in Go

fmt.Errorf()

Errorf formats according to a format specifier and returns the string as a value that satisfies error. For more on error handling see error handling.