Google has a package to generate a UUID compatible with RFC 4122 and DCE 1.1.
Add it to your project:
go get github.com/google/uuid
Generating UUIDs:
package main
import (
"fmt"
"github.com/google/uuid"
)
func main() {
myUUID := uuid.New()
fmt.Println(myUUID.String())
}