You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm always confused whether I should use log.Print or log.Println (and I've been coding small Golang apps for years). Today I spend some time digging into the difference and I had to do human word-by-word comparison to conclude that they are doing the exact same thing. https://golang.org/pkg/log/#Print and https://golang.org/pkg/log/#Println both state
X calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Println.
Modify both docs to something like "X calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Println. This function does the same as Y."
Also, this entire issue is under the assumption that one of the methods shouldn't be deprecated (I assume they are both being used in a lot of places).
The text was updated successfully, but these errors were encountered:
I'm always confused whether I should use
log.Print
orlog.Println
(and I've been coding small Golang apps for years). Today I spend some time digging into the difference and I had to do human word-by-word comparison to conclude that they are doing the exact same thing. https://golang.org/pkg/log/#Print and https://golang.org/pkg/log/#Println both stateProposal to improve the documentation:
Also, this entire issue is under the assumption that one of the methods shouldn't be deprecated (I assume they are both being used in a lot of places).
The text was updated successfully, but these errors were encountered: