diff options
| author | 2026-05-24 08:18:01 +0000 | |
|---|---|---|
| committer | 2026-05-24 08:18:08 +0000 | |
| commit | 3e353aa8ec1de589698f8d6c97e53f58e50fb1a9 (patch) | |
| tree | f0bd34c5a730606f78307b9e41e070507d4f7bad /object | |
| parent | object{,/blob,/commit}: Fix lints (diff) | |
| signature | No signature | |
*: Reformat
Diffstat (limited to 'object')
| -rw-r--r-- | object/id/algorithm_details.go | 20 | ||||
| -rw-r--r-- | object/id/algorithm_parse.go | 2 |
2 files changed, 11 insertions, 11 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, }, } diff --git a/object/id/algorithm_parse.go b/object/id/algorithm_parse.go index 271c3e60..7349288f 100644 --- a/object/id/algorithm_parse.go +++ b/object/id/algorithm_parse.go @@ -5,4 +5,4 @@ func ParseAlgorithm(s string) (Algorithm, bool) { algo, ok := algorithmByName[s] return algo, ok -}
\ No newline at end of file +} |
