Skip to content

Commit ebcd55a

Browse files
committed
lint
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
1 parent f4fdb87 commit ebcd55a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/attestation/crafter/materials/helmchart.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"archive/tar"
2020
"compress/gzip"
2121
"context"
22+
"errors"
2223
"fmt"
2324
"io"
2425
"os"
@@ -153,7 +154,7 @@ func (c *HelmChartCrafter) validateYamlFile(r io.Reader, allowEmpty bool) error
153154
if err := yaml.NewDecoder(r).Decode(v); err != nil {
154155
// io.EOF means the file is empty or contains only comments
155156
// This is valid for values.yaml
156-
if err == io.EOF && allowEmpty {
157+
if errors.Is(err, io.EOF) && allowEmpty {
157158
return nil
158159
}
159160
return fmt.Errorf("failed to unmarshal YAML file: %w", err)

0 commit comments

Comments
 (0)