Home >Backend Development >Golang >The difference between print and fmt in golang

The difference between print and fmt in golang

王林
王林Original
2019-12-07 10:10:013421browse

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.

The difference between print and fmt in golang

<span style="font-size: 14px;">fmt.print</span> is a standard output stream in golang and is generally used for Screen output.

The difference between print and fmt in golang

##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 difference between print and fmt in golang

Related article tutorials:

golang tutorial

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn