UUID in Go: Difference between revisions
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
=Conversion of a <tt>string</tt> to UUID= | =Conversion of a <tt>string</tt> to UUID= | ||
<syntaxhighlight lang='go'> | |||
s := "59959107-8ea1-4bb8-a5ff-eb16b3ac6532" | |||
uuid := uuid.MustParse(s) | |||
</syntaxhighlight> |
Latest revision as of 18:18, 1 February 2024
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)