From 38b560d49f14ee0a3e05563d4a502705969120db Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 28 Sep 2024 06:25:12 -0300 Subject: src/guuid.go: Remove "uuid" prefix from constants --- src/guuid.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/guuid.go') diff --git a/src/guuid.go b/src/guuid.go index 267affb..b8cf5fe 100644 --- a/src/guuid.go +++ b/src/guuid.go @@ -11,9 +11,9 @@ import ( const ( - UUIDByteCount = 16 - uuidDashCount = 4 - uuidEncodedLength = (UUIDByteCount * 2) + uuidDashCount + ByteCount = 16 + dashCount = 4 + encodedLength = (ByteCount * 2) + dashCount ) var ( @@ -27,7 +27,7 @@ var ( -type UUID [UUIDByteCount]byte +type UUID [ByteCount]byte @@ -56,7 +56,7 @@ func NewBytes() []byte { } func (uuid UUID) String() string { - dst := [uuidEncodedLength]byte { + dst := [encodedLength]byte { 0, 0, 0, 0, 0, 0, 0, 0, '-', @@ -81,11 +81,11 @@ func (uuid UUID) String() string { } func FromString(str string) (UUID, error) { - if len(str) != uuidEncodedLength { + if len(str) != encodedLength { return emptyUUID, ErrBadLength } - if strings.Count(str, "-") != uuidDashCount { + if strings.Count(str, "-") != dashCount { return emptyUUID, ErrBadDashCount } @@ -101,5 +101,5 @@ func FromString(str string) (UUID, error) { return emptyUUID, err } - return [UUIDByteCount]byte(data), nil + return [ByteCount]byte(data), nil } -- cgit v1.2.3