0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Go】fmt.Printfには改行を入れよう

Posted at

##概要
先日、db周りの変数を調べるためにfmt.Printfを使って確認していたらfmt.Printfの中身が出力されなくなったので、自分の解決方法を書いておきます。
##解決方法

main.go
fmt.Printf("hoge変数の中身=%v",hoge)//これを
fmt.Printf("hoge変数の中身=%v\n",hoge)//こうする(\nを付ける)

初歩的な事だとは思いますが改行とともに何の変数かがわかる文字列も一緒に出力すると分かりやすくていいと思います。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?