Documentation
¶
Index ¶
Constants ¶
View Source
const ( PROTOBOM_LONG_DESCRIPTION = "Translate SBOM formats such as CycloneDX and SPDX" PROTOBOM_SHORT_DESCRIPTION = "Translate SBOM formats" ProtobomUserExample = `` /* 375-byte string literal not displayed */ )
Variables ¶
View Source
var ( ApplicationName = "protobom" Cfg internal.Application )
View Source
var RootCmd = &cobra.Command{ Long: PROTOBOM_LONG_DESCRIPTION, Use: fmt.Sprintf("%s [sbom]", ApplicationName), Short: PROTOBOM_SHORT_DESCRIPTION, Example: Tprintf(ProtobomUserExample, map[string]interface{}{ "appName": ApplicationName, }), DisableAutoGenTag: true, CompletionOptions: cobra.CompletionOptions{DisableDefaultCmd: true}, Args: cobra.MinimumNArgs(1), Hidden: false, SilenceUsage: true, SilenceErrors: false, PreRunE: func(cmd *cobra.Command, args []string) error { return nil }, RunE: func(cmd *cobra.Command, args []string) error { path := args[0] logrus.Infof("Running %s on %s", ApplicationName, path) v, err := json.MarshalIndent(Cfg, "", " ") if err != nil { return err } logrus.WithField("config", string(v)).Debugf("Protobom config") err = internal.Translate(path, &Cfg) return err }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.