3000 explained code solutions for 75 technologies

golangHow to generate UUID value

This uses uuid module that should be installed by go get github.com/google/uuid command:

package main

import "fmt"
import "github.com/google/uuid"

func main() {
  uid = uuid.New()
}ctrl + c

module to work with uuid


init new UUID value


converts generated UUID to string