1
0
mirror of https://github.com/opencontainers/go-digest.git synced 2025-07-13 21:41:44 +03:00

address some linting issues

- rename "digester" vars that shadowed package-level digester type
- rename "hexdigestbytes" to be properly camelCase
- use "errors.Is()" instead of straight comparing errors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2024-07-02 12:08:01 +02:00
parent 22b78e4785
commit a1f6e2eda3
4 changed files with 13 additions and 13 deletions

View File

@ -19,6 +19,7 @@ import (
"bytes"
"crypto"
"crypto/rand"
"errors"
"flag"
"fmt"
"strings"
@ -56,7 +57,7 @@ func TestFlagInterface(t *testing.T) {
} {
t.Run(testcase.Name, func(t *testing.T) {
alg = Canonical
if err := flagSet.Parse(testcase.Args); err != testcase.Err {
if err := flagSet.Parse(testcase.Args); !errors.Is(err, testcase.Err) {
if testcase.Err == nil {
t.Fatal("unexpected error", err)
}