0xBF
0xBF

Follow

0xBF

Follow

Go Cheatsheet - Generate UUIDv4 String

0xBF's photo
0xBF
·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