Created
April 9, 2023 05:25
-
-
Save jmarhee/7e2cdf8c0d8cf8f0f503f34faed7ca03 to your computer and use it in GitHub Desktop.
Generate UUIDs in Go.
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
module uuid-generator | |
go 1.16 | |
require github.com/google/uuid v1.2.0 |
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
package main | |
import ( | |
"fmt" | |
"github.com/google/uuid" | |
) | |
func main() { | |
newUUID := uuid.New() | |
fmt.Println(newUUID) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment