Golang Fprint* what does the f stand for

Lee

The fmt package has some functions for string formatting. Sprint* I am pretty sure stands for string print. Print* writes to STDOUT What does the F stand for with the Fprint* functions?

Cubic

The "f" stands for "file" - it's a C/Unix-ism. Of course Fprint can write to arbitrary Writers, but in the Unix world file is a pretty generic concept and can refer to pretty much anything from "normal" files to socket (streams) or data generated by programs (before any downvotes - yes, I know I'm a bit oversimplifying things, but the question wasn't about the Unix concept of a file so...)

The fmt function names are similar to the C names to ease C programmers already familiar with them in.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related