GO 格式化 INT,位数不够0补齐 package main import "fmt" func main() { n := 2 sInt := fmt.Sprintf("%02d", n) fmt.Println(sInt) }