github.com/buildpacks/pack@v0.33.3-0.20240516162812-884dd1837311/internal/commands/list_trusted_builders.go (about)

     1  package commands
     2  
     3  import (
     4  	"github.com/spf13/cobra"
     5  
     6  	"github.com/buildpacks/pack/internal/config"
     7  	"github.com/buildpacks/pack/pkg/logging"
     8  )
     9  
    10  // Deprecated: Use `config trusted-builders list` instead
    11  func ListTrustedBuilders(logger logging.Logger, cfg config.Config) *cobra.Command {
    12  	cmd := &cobra.Command{
    13  		Use:     "list-trusted-builders",
    14  		Short:   "List Trusted Builders",
    15  		Long:    "List Trusted Builders.\n\nShow the builders that are either trusted by default or have been explicitly trusted locally using `trusted-builder add`",
    16  		Example: "pack list-trusted-builders",
    17  		Hidden:  true,
    18  		RunE: logError(logger, func(cmd *cobra.Command, args []string) error {
    19  			deprecationWarning(logger, "list-trusted-builders", "config trusted-builders list")
    20  			listTrustedBuilders(args, logger, cfg)
    21  			return nil
    22  		}),
    23  	}
    24  
    25  	AddHelpFlag(cmd, "list-trusted-builders")
    26  	return cmd
    27  }