Home > Article > Backend Development > The difference between print and fmt in golang
<span style="font-size: 14px;">print</span>
In golang, it is output to the standard error stream and printed. It is not officially recommended to use it when writing programs. It can be used during debugging.
<span style="font-size: 14px;">fmt.print</span>
is a standard output stream in golang and is generally used for Screen output.
##fmt.Printf<span style="font-size: 14px;"></span>
is formatted output; fmt.Println It is to wrap the line after output;
fmt.Sprint is to return a formatted string.
The above is the detailed content of The difference between print and fmt in golang. For more information, please follow other related articles on the PHP Chinese website!