Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 89e7b65

Browse files
committed
Lint
1 parent 0d53038 commit 89e7b65

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

sbom/syft.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ import (
3131
"github.com/anchore/syft/syft/pkg/cataloger/deb"
3232
"github.com/anchore/syft/syft/pkg/cataloger/rpm"
3333
"github.com/anchore/syft/syft/source"
34-
"github.com/atomist-skills/go-skill"
3534
"github.com/pkg/errors"
3635

36+
"github.com/atomist-skills/go-skill"
37+
3738
"github.com/docker/index-cli-plugin/registry"
3839
"github.com/docker/index-cli-plugin/sbom/detect"
3940
"github.com/docker/index-cli-plugin/sbom/util"
@@ -57,7 +58,7 @@ func syftSbom(cache *registry.ImageCache, lm *types.LayerMapping, resultChan cha
5758
resultChan <- result
5859
return
5960
}
60-
61+
6162
d, qualifiers := osQualifiers(distro)
6263
result.Distro = d
6364

@@ -111,7 +112,7 @@ func syftSbom(cache *registry.ImageCache, lm *types.LayerMapping, resultChan cha
111112
}
112113
}
113114
}
114-
115+
115116
result.Packages = make([]types.Package, 0)
116117
packages := packageCatalog.Sorted()
117118
for _, p := range packages {

sbom/trivy.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ import (
3535
"github.com/aquasecurity/trivy/pkg/fanal/image"
3636
stypes "github.com/aquasecurity/trivy/pkg/fanal/types"
3737
"github.com/aquasecurity/trivy/pkg/fanal/utils"
38-
"github.com/atomist-skills/go-skill"
3938
"github.com/pkg/errors"
4039

40+
"github.com/atomist-skills/go-skill"
41+
4142
"github.com/docker/index-cli-plugin/registry"
4243
"github.com/docker/index-cli-plugin/types"
4344
)
@@ -67,7 +68,7 @@ func trivySbom(cache *registry.ImageCache, lm *types.LayerMapping, resultChan ch
6768
resultChan <- result
6869
return
6970
}
70-
71+
7172
art, err := aimage.NewArtifact(img, cacheClient, configOptions())
7273
if err != nil {
7374
result.Status = types.Failed
@@ -226,7 +227,7 @@ func configOptions() artifact.Option {
226227
DisabledAnalyzers: []analyzer.Type{analyzer.TypeDockerfile, analyzer.TypeSecret, analyzer.TypeHelm, analyzer.TypeTerraform, analyzer.TypeJSON, analyzer.TypeYaml},
227228
}
228229
if v, ok := os.LookupEnv("ATOMIST_OFFLINE"); ok {
229-
if o, err := strconv.ParseBool(v); err == nil && o{
230+
if o, err := strconv.ParseBool(v); err == nil && o {
230231
opts.Offline = true
231232
}
232233
}

0 commit comments

Comments
 (0)