0xBF
0xBF

0xBF

Go Cheatsheet - Generate UUIDv4 String

0xBF's photo
0xBF

Published on Aug 26, 2021

1 min read

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)
}
 
Share this