diff --git a/pkg/cmd/scan/output/config.go b/pkg/cmd/scan/output/config.go index 2a08a5eb..895a1216 100644 --- a/pkg/cmd/scan/output/config.go +++ b/pkg/cmd/scan/output/config.go @@ -8,5 +8,5 @@ type OutputConfig struct { } func (o *OutputConfig) String() string { - return fmt.Sprintf("%s://%s", o.Key, o.Options["path"]) + return fmt.Sprintf("%s://%s", o.Key, o.Path) } diff --git a/pkg/cmd/scan_test.go b/pkg/cmd/scan_test.go index d3a336bf..b374f0ac 100644 --- a/pkg/cmd/scan_test.go +++ b/pkg/cmd/scan_test.go @@ -302,22 +302,16 @@ func Test_parseOutputFlag(t *testing.T) { }, want: []output.OutputConfig{ { - Key: "json", - Options: map[string]string{ - "path": "result1.json", - }, + Key: "json", + Path: "result1.json", }, { - Key: "json", - Options: map[string]string{ - "path": "result2.json", - }, + Key: "json", + Path: "result2.json", }, { - Key: "json", - Options: map[string]string{ - "path": "result3.json", - }, + Key: "json", + Path: "result3.json", }, }, err: nil,