summaryrefslogtreecommitdiff
path: root/pkg/btrfs/uuid.go
blob: 5218a3f3389bdf4351fe04acf6e94bb23d8338bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package btrfs

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],
	}, "-")
}