github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/src/cmd/tools/syft.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // SPDX-FileCopyrightText: 2021-Present The Jackal Authors
     3  
     4  // Package tools contains the CLI commands for Jackal.
     5  package tools
     6  
     7  import (
     8  	"github.com/Racer159/jackal/src/config/lang"
     9  	"github.com/anchore/clio"
    10  	syftCLI "github.com/anchore/syft/cmd/syft/cli"
    11  )
    12  
    13  // ldflags github.com/Racer159/jackal/src/cmd/tools.syftVersion=x.x.x
    14  var syftVersion string
    15  
    16  func init() {
    17  	syftCmd := syftCLI.Command(clio.Identification{
    18  		Name:    "syft",
    19  		Version: syftVersion,
    20  	})
    21  	syftCmd.Use = "sbom"
    22  	syftCmd.Short = lang.CmdToolsSbomShort
    23  	syftCmd.Aliases = []string{"s", "syft"}
    24  	syftCmd.Example = ""
    25  
    26  	for _, subCmd := range syftCmd.Commands() {
    27  		subCmd.Example = ""
    28  	}
    29  
    30  	toolsCmd.AddCommand(syftCmd)
    31  }