Skip to main content

Go Cheatsheet - Generate UUIDv4 String

Updated 1 min readMarkdown
Part of seriesGo Cheatsheet

Use 3rd-party package to generate uuidv4 string:

Step 1

Install package:

go get github.com/google/uuid

Step 2

Call function:

func main() {
    uuidStr := uuid.NewString()
    fmt.Println(uuidStr)
}

No comments yet. Be the first to comment.