Go Output Functions - Print - Println - PrintfIn Go, there are three functions to output text.
Go Print() FunctionGo print() function is one of the output functions which print the arguments with their default format
Go Println() FunctionGo Println() function is one of the output functions which print a new line every time it's called and it also add a whitespace between printed arguments
Go Printf() FunctionGo Printf() function is one of the output functions which can print the value and type concatenated to message
- %v is used to print the value of the arguments
- %T is used to print the type of the arguments
j has value: 35 and type: int
k has value: true and type: bool
In this page (written and validated by A. Gawali) you learned about Go Output Functions - Print - Println - Printf . What's Next? If you are interested in completing Go tutorial, your next topic will be learning about: Go Print Output text in color in console.