UUID in Go

From NovaOrdis Knowledge Base
Revision as of 18:18, 1 February 2024 by Ovidiu (talk | contribs) (→‎Conversion of a string to UUID)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

External

Internal

Overview

go.mod:

require (
	github.com/google/uuid v1.5.0
)
uuid := uuid.New()

Conversion of a string to UUID

s := "59959107-8ea1-4bb8-a5ff-eb16b3ac6532"
uuid := uuid.MustParse(s)