Created
August 3, 2018 19:54
-
-
Save crgimenes/fb6ae9559f810cc194b9dcd135a23738 to your computer and use it in GitHub Desktop.
Filename for temp files
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 newFileName() string { | |
buff := make([]byte, 6) | |
rand.Read(buff) | |
return fmt.Sprintf("%v-%X\n", time.Now().UTC().Format("2006-01-02T150405"), buff) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment