In code
Generate a UUID in Go
The google/uuid module is the de-facto standard.
Go example
Go
import "github.com/google/uuid"
id := uuid.New().String()
No install? Use the tool or API
Here's a fresh version 4 UUID generated right now — copy it, or call the API from any language.
9f2a9eb8-8fde-4239-bba6-8cef4698d76b
curl https://getuuid.sh/api/uuid