Created
March 23, 2018 06:04
-
-
Save wjx0912/aa92d5f2d7ad0873b0d3cd52a79a3a0e to your computer and use it in GitHub Desktop.
golang generate identifying code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func makeCode() (code string) { | |
code = strconv.Itoa(rand.New(rand.NewSource(time.Now().UnixNano())).Intn(899999) + 100000) | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment