diff options
| author | 2026-03-30 05:51:15 +0000 | |
|---|---|---|
| committer | 2026-03-30 05:51:15 +0000 | |
| commit | 62b653a199af145b8ae00354eb051e29ff32bca9 (patch) | |
| tree | 82720bc3adecaa30e35b167b58727d10485233cf | |
| parent | object/tree: Add helpers and cleanup (diff) | |
| signature | No signature | |
object/*: Fix lints
| -rw-r--r-- | object/id/algorithm_tables.go | 2 | ||||
| -rw-r--r-- | object/signed/tag/parse.go | 2 | ||||
| -rw-r--r-- | object/tree/remove.go | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/object/id/algorithm_tables.go b/object/id/algorithm_tables.go index 92b77de0..e4ec3257 100644 --- a/object/id/algorithm_tables.go +++ b/object/id/algorithm_tables.go @@ -61,10 +61,12 @@ func init() { //nolint:gochecknoinits } info.emptyTree = info.sum(emptyTreeInput) + algorithmByName[info.name] = algo if info.signatureHeaderName != "" { algorithmBySignatureHeaderName[info.signatureHeaderName] = algo } + supportedAlgorithms = append(supportedAlgorithms, algo) } } diff --git a/object/signed/tag/parse.go b/object/signed/tag/parse.go index e2556355..b2061d3f 100644 --- a/object/signed/tag/parse.go +++ b/object/signed/tag/parse.go @@ -52,6 +52,7 @@ func Parse(body []byte, storageAlgo objectid.Algorithm) (*Tag, error) { } payloadStart := 0 + payloadEnd := signatureStart if signatureStart == len(body) { payloadEnd = len(body) @@ -122,6 +123,7 @@ func Parse(body []byte, storageAlgo objectid.Algorithm) (*Tag, error) { } tag.appendPayloadRange(payloadStart, payloadEnd) + if signatureStart != len(body) { tag.signatures[storageAlgo] = append(tag.signatures[storageAlgo], byteRange{ start: signatureStart, diff --git a/object/tree/remove.go b/object/tree/remove.go index fe4fda32..9a099842 100644 --- a/object/tree/remove.go +++ b/object/tree/remove.go @@ -17,6 +17,7 @@ func (tree *Tree) RemoveEntry(name []byte) error { }) if index >= 0 { tree.Entries = slices.Delete(tree.Entries, index, index+1) + return nil } |
