占位符
package main
import "fmt"
func main() {
var n = 100
// 查看变量类型
fmt.Printf("%T\n", n) // int
fmt.Printf("%v\n", n) // 100
fmt.Printf("%b\n", n) // 1100100
fmt.Printf("%d\n", n) // 100
fmt.Printf("%o\n", n) // 144
fmt.Printf("%x\n", n) // 64
var s = "Hello 香蕉"
fmt.Printf("字符串:%s\n", s) // 字符串:Hello 香蕉
fmt.Printf("字符串:%v\n", s) // 字符串:Hello 香蕉
fmt.Printf("字符串:%#v\n", s) // 字符串:"Hello 香蕉"
}