github.com/buildpacks/pack@v0.33.3-0.20240516162812-884dd1837311/internal/commands/extension_register.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  type ExtensionRegisterFlags struct {
    11  	ExtensionRegistry string
    12  }
    13  
    14  func ExtensionRegister(logger logging.Logger, cfg config.Config, pack PackClient) *cobra.Command {
    15  	cmd := &cobra.Command{
    16  		Use:     "register <image>",
    17  		Args:    cobra.ExactArgs(1),
    18  		Short:   "Register an extension to a registry",
    19  		Example: "pack extension register <extension-example>",
    20  		RunE: logError(logger, func(cmd *cobra.Command, args []string) error {
    21  			// logic will be added here
    22  			return nil
    23  		}),
    24  	}
    25  	// flags will be added here
    26  	AddHelpFlag(cmd, "register")
    27  	return cmd
    28  }