github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/cmd/juju/charmcmd/charm.go (about)

     1  // Copyright 2016 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package charmcmd
     5  
     6  import (
     7  	"github.com/juju/cmd"
     8  
     9  	"github.com/juju/juju/cmd/juju/resource"
    10  )
    11  
    12  var charmDoc = `
    13  "juju charm" is the the juju CLI equivalent of the "charm" command used
    14  by charm authors, though only applicable functionality is mirrored.
    15  `
    16  
    17  const charmPurpose = "Interact with charms."
    18  
    19  // Command is the top-level command wrapping all charm functionality.
    20  type Command struct {
    21  	cmd.SuperCommand
    22  }
    23  
    24  // NewSuperCommand returns a new charm super-command.
    25  func NewSuperCommand() *Command {
    26  	charmCmd := &Command{
    27  		SuperCommand: *cmd.NewSuperCommand(
    28  			cmd.SuperCommandParams{
    29  				Name:        "charm",
    30  				Doc:         resource.DeprecatedSince + charmDoc,
    31  				UsagePrefix: "juju",
    32  				Purpose:     resource.Deprecated + charmPurpose,
    33  			},
    34  		),
    35  	}
    36  	charmCmd.Register(resource.NewListCharmResourcesCommand(nil))
    37  	return charmCmd
    38  }