The difference between print and fmt in golang

王林
Release: 2019-12-07 10:10:01
Original
3253 people have browsed it

The difference between print and fmt in golang

printIn 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

fmt.printis a standard output stream in golang and is generally used for Screen output.

The difference between print and fmt in golang

##fmt.Printfis formatted output;fmt.PrintlnIt is to wrap the line after output;fmt.Sprintis 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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!