Difference between fmt.Println() and println() in Go

println is an built-in function (into the runtime) which may eventually be removed, while the fmt package is in the standard library, which will persist. See the spec on that topic.

For language developers it is handy to have a println without dependencies, but the way to go is to use the fmt package or something similar (log for example).

As you can see in the implementation the print(ln) functions are not designed to even remotely support a different output mode and are mainly a debug tool.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)