Skip to content

Commit c51dafa

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

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

pkg/attestation/crafter/api/attestation/v1/crafting_state.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,14 @@ func (m *Attestation_Material) GetEvaluableContent(value string) ([]byte, error)
9696
if artifact != nil {
9797
if m.InlineCas && m.MaterialType != v1.CraftingSchema_Material_HELM_CHART {
9898
rawMaterial = artifact.GetContent()
99-
} else if value == "" {
99+
}
100+
101+
if !m.InlineCas && value == "" {
100102
return nil, errors.New("artifact path required")
101-
} else if m.MaterialType != v1.CraftingSchema_Material_HELM_CHART &&
103+
}
104+
105+
if !m.InlineCas &&
106+
m.MaterialType != v1.CraftingSchema_Material_HELM_CHART &&
102107
m.MaterialType != v1.CraftingSchema_Material_JUNIT_XML {
103108
// read content from local filesystem (except for tgz charts)
104109
rawMaterial, err = os.ReadFile(value)

0 commit comments

Comments
 (0)