aboutsummaryrefslogtreecommitdiff
path: root/object/id/algorithm_details.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-05-24 08:18:01 +0000
committerGravatar Runxi Yu2026-05-24 08:18:08 +0000
commit3e353aa8ec1de589698f8d6c97e53f58e50fb1a9 (patch)
treef0bd34c5a730606f78307b9e41e070507d4f7bad /object/id/algorithm_details.go
parentobject{,/blob,/commit}: Fix lints (diff)
signatureNo signature
*: Reformat
Diffstat (limited to 'object/id/algorithm_details.go')
-rw-r--r--object/id/algorithm_details.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/object/id/algorithm_details.go b/object/id/algorithm_details.go
index 72e953a1..5f782be7 100644
--- a/object/id/algorithm_details.go
+++ b/object/id/algorithm_details.go
@@ -7,10 +7,10 @@ import (
)
type algorithmDetails struct {
- name string
- size int
- sum func([]byte) ObjectID
- new func() hash.Hash
+ name string
+ size int
+ sum func([]byte) ObjectID
+ new func() hash.Hash
}
func (algo Algorithm) details() algorithmDetails {
@@ -21,8 +21,8 @@ func (algo Algorithm) details() algorithmDetails {
var algorithmTable = [...]algorithmDetails{
AlgorithmUnknown: {}, //nolint:exhaustruct
AlgorithmSHA1: {
- name: "sha1",
- size: sha1.Size,
+ name: "sha1",
+ size: sha1.Size,
sum: func(data []byte) ObjectID {
sum := sha1.Sum(data) //#nosec G401
@@ -32,11 +32,11 @@ var algorithmTable = [...]algorithmDetails{
return id
},
- new: sha1.New,
+ new: sha1.New,
},
AlgorithmSHA256: {
- name: "sha256",
- size: sha256.Size,
+ name: "sha256",
+ size: sha256.Size,
sum: func(data []byte) ObjectID {
sum := sha256.Sum256(data)
@@ -46,7 +46,7 @@ var algorithmTable = [...]algorithmDetails{
return id
},
- new: sha256.New,
+ new: sha256.New,
},
}