Organize All Print type in Golang

Jiwan Jeon·2022년 2월 20일
0

Golang

목록 보기
2/4

✅ Include "ln" or not

: The println("...") method prints the string "..." abd moves the cursor to a new line. The print("...") method instead prints just the string "...", but does not move the curosr to a new line.

  • Printf : When I want to print variables

✅ Fprint

: F means file

  • func Fprint(w io.Writer, a ...interface{}) (n int, err error)
  • func Fprintln(w io.Writer, a ...interface{}) (n int, err error)
  • func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error)

✅ Sprint

: S means String

  • func Sprint(w io.Writer, a ...interface{}) (n int, err error)
  • func Sprintln(w io.Writer, a ...interface{}) (n int, err error)
  • func Sprintf(w io.Writer, format string, a ...interface{}) (n int, err error)

: In this Sprint function, it doesn't print out on the screen or files. Howeverm it print out on the memory.

profile
Jiwan Jeon

0개의 댓글