Golang Fprint *, which means f

The fmt package has several functions for formatting strings. Sprint* I'm pretty sure this is a printable string. Print* written to STDOUT. What does F mean for Fprint* functions?

+7
go
source share
1 answer

"f" means "file" - this is C / Unix-ism. Of course, Fprint can write arbitrary Writer s, but in the Unix world file it's a pretty general concept and can refer to almost anything: from β€œnormal” files to sockets (streams) or data created by programs (to downvotes - yes, I know, that I simplify things a little, but the question was not in the concept of a Unix file, so ...)

Fmt function names are similar to C names to make it easier for C programmers already familiar with them.

+13
source share

All Articles