Files
syft/cmd/syft/internal/options/format_spdx_json.go
T
2026-06-22 10:59:34 -04:00

23 lines
428 B
Go

package options
import (
"github.com/anchore/syft/syft/format/spdxjson"
)
type FormatSPDXJSON struct {
Pretty *bool `yaml:"pretty" json:"pretty" mapstructure:"pretty"`
}
func DefaultFormatSPDXJSON() FormatSPDXJSON {
return FormatSPDXJSON{}
}
func (o FormatSPDXJSON) config(v string) spdxjson.EncoderConfig {
c := spdxjson.DefaultEncoderConfig()
c.Version = v
if o.Pretty != nil {
c.Pretty = *o.Pretty
}
return c
}