github.com/rogpeppe/juju@v0.0.0-20140613142852-6337964b789e/cmd/charm-admin/main.go (about)

     1  // Copyright 2012, 2013 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package main
     5  
     6  import (
     7  	"fmt"
     8  	"os"
     9  
    10  	"github.com/juju/cmd"
    11  
    12  	jujucmd "github.com/juju/juju/cmd"
    13  )
    14  
    15  func main() {
    16  	ctx, err := cmd.DefaultContext()
    17  	if err != nil {
    18  		fmt.Fprintf(os.Stderr, "error: %v\n", err)
    19  		os.Exit(2)
    20  	}
    21  
    22  	admcmd := jujucmd.NewSuperCommand(cmd.SuperCommandParams{
    23  		Name: "charm-admin",
    24  	})
    25  
    26  	admcmd.Register(&DeleteCharmCommand{})
    27  
    28  	os.Exit(cmd.Main(admcmd, ctx, os.Args[1:]))
    29  }