1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
package internal import ( "encoding/hex" "strings" ) type UUID [16]byte func (uuid UUID) String() string { str := hex.EncodeToString(uuid[:]) return strings.Join([]string{ str[:8], str[8:12], str[12:16], str[16:20], str[20:32], }, "-") }