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.
860c59d7-996a-433e-90c0-23a542cc6826
curl https://getuuid.sh/api/uuid