diff options
Diffstat (limited to 'lib/btrfs/btrfsitem')
-rw-r--r-- | lib/btrfs/btrfsitem/item_uuid.go | 4 | ||||
-rw-r--r-- | lib/btrfs/btrfsitem/items.go | 4 | ||||
-rw-r--r-- | lib/btrfs/btrfsitem/statmode.go | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/btrfs/btrfsitem/item_uuid.go b/lib/btrfs/btrfsitem/item_uuid.go index e1a6cf9..5f5f357 100644 --- a/lib/btrfs/btrfsitem/item_uuid.go +++ b/lib/btrfs/btrfsitem/item_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 @@ -12,7 +12,7 @@ import ( ) // The Key for this item is a UUID, and the item is a subvolume IDs -// that that UUID maps to. +// that UUID maps to. // // key.objectid = first half of UUID // key.offset = second half of UUID diff --git a/lib/btrfs/btrfsitem/items.go b/lib/btrfs/btrfsitem/items.go index 29b3cb0..67f96fa 100644 --- a/lib/btrfs/btrfsitem/items.go +++ b/lib/btrfs/btrfsitem/items.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 @@ -70,7 +70,6 @@ func UnmarshalItem(key btrfsprim.Key, csumType btrfssum.CSumType, dat []byte) It Dat: dat, Err: fmt.Errorf("btrfsitem.UnmarshalItem({ItemType:%v}, dat): %w", key.ItemType, err), } - } if n < len(dat) { return Error{ @@ -79,5 +78,6 @@ func UnmarshalItem(key btrfsprim.Key, csumType btrfssum.CSumType, dat []byte) It key.ItemType, len(dat), n), } } + //nolint:forcetypeassert // items_gen.go has all types in keytype2gotype implement the Item interface. return retPtr.Elem().Interface().(Item) } diff --git a/lib/btrfs/btrfsitem/statmode.go b/lib/btrfs/btrfsitem/statmode.go index a1302ee..557b688 100644 --- a/lib/btrfs/btrfsitem/statmode.go +++ b/lib/btrfs/btrfsitem/statmode.go @@ -1,5 +1,5 @@ // Copyright (C) 2020-2021 Ambassador Labs -// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com> +// Copyright (C) 2022-2023 Luke Shumaker <lukeshu@lukeshu.com> // // SPDX-License-Identifier: Apache-2.0 // @@ -9,7 +9,6 @@ package btrfsitem type StatMode uint32 -//nolint:deadcode,varcheck // not all of these modes will be used const ( // 16 bits = 5⅓ octal characters @@ -73,6 +72,7 @@ func (mode StatMode) IsRegular() bool { // 's' (GNU `ls` behavior; though POSIX notes that many // implementations use '=' for sockets). func (mode StatMode) String() string { + //nolint:gomnd // Magic numbers is all this is. buf := [10]byte{ // type: This string is easy; it directly pairs with // the above ModeFmtXXX list above; the character in |