golang 前补0
func StrPad( str int64, index int) string { ending := strconv.FormatInt(str, 10) switch { case len(ending) <= index: return fmt.Sprintf("%0"+fmt.Sprintf("%vs", index), ending) case len(ending) > index: return fmt.Sprintf("%."+fmt.Sprintf("%vs", index), ending[len(ending)-index:]) default: return ending } }