diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-01 20:48:22 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-01 22:42:08 -0700 |
commit | 97fa22c161056c289a9978f20e3fb6b05d779a23 (patch) | |
tree | aabf3ec9a0f4b8f659f4d12f4c9a31a9ddfdc247 /lib/btrfs/btrfsprim | |
parent | b261c2a4f5f028c9d83cef208ccc7d829f841bad (diff) |
lint: Turn on gomnd
Diffstat (limited to 'lib/btrfs/btrfsprim')
-rw-r--r-- | lib/btrfs/btrfsprim/objid.go | 3 | ||||
-rw-r--r-- | lib/btrfs/btrfsprim/uuid.go | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/btrfs/btrfsprim/objid.go b/lib/btrfs/btrfsprim/objid.go index 17a0eeb..5ba213d 100644 --- a/lib/btrfs/btrfsprim/objid.go +++ b/lib/btrfs/btrfsprim/objid.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -68,6 +68,7 @@ func (id ObjID) Format(typ ItemType) string { case DEV_EXTENT_KEY: return fmt.Sprintf("%d", int64(id)) case QGROUP_RELATION_KEY: + //nolint:gomnd // TODO: I'm not sure what the 48/16 bit split means. return fmt.Sprintf("%d/%d", uint64(id)>>48, uint64(id)&((1<<48)-1)) diff --git a/lib/btrfs/btrfsprim/uuid.go b/lib/btrfs/btrfsprim/uuid.go index 4e3fd6b..0103ee4 100644 --- a/lib/btrfs/btrfsprim/uuid.go +++ b/lib/btrfs/btrfsprim/uuid.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: GPL-2.0-or-later @@ -56,6 +56,7 @@ func (a UUID) Cmp(b UUID) int { return 0 } +//nolint:gomnd // This is all magic numbers. func ParseUUID(str string) (UUID, error) { var ret UUID j := 0 |