Documentation ¶
Index ¶
Constants ¶
View Source
const V4UUIDRegex = "\\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}\\b"
V4UUIDRegex is a simple string regex that will match valid v4 UUIDs
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UUID ¶
type UUID [16]byte
UUID Represents a UUID
func GetUUIDFromByteSlice ¶
GetUUIDFromByteSlice takes a slice of bytes and converts it to a UUID If the slice is not 16 bytes long it will return an error @TODO add version checking
func GetUUIDFromString ¶
GetUUIDFromString takes a string representing a UUID and converts it to a UUID type Returns an error if the string does not match a UUID
func (*UUID) GetVersion ¶
GetVersion returns the version of the UUID based on the 13th character (1st char of 7th byte) of the UUID
Click to show internal directories.
Click to hide internal directories.