package main import ( "fmt" "math/rand" "bytes" ) func main() { fmt.Println( time.Now().UTC().UnixNano() ) } func randomString (l int ) string { var result bytes.Buffer var temp string for i:=0 ; i<l ; { temp = string(randInt(65,90)) result.WriteString(temp) i++ } return result.String() } func randInt(min int , max int) int { return min + rand.Intn(max-min) }
有疑问加站长微信联系(非本文作者)