cobra: github.com/spf13/cobra/cobra/cmd Index | Files

package cmd

import "github.com/spf13/cobra/cobra/cmd"

Index

Package Files

add.go helpers.go init.go license_agpl.go license_apache_2.go license_bsd_clause_2.go license_bsd_clause_3.go license_gpl_2.go license_gpl_3.go license_lgpl.go license_mit.go licenses.go project.go root.go

Variables

var Licenses = make(map[string]License)

Licenses contains all possible licenses a user can choose from.

func Execute Uses

func Execute() error

Execute executes the root command.

type Command Uses

type Command struct {
    CmdName   string
    CmdParent string
    *Project
}

func (*Command) Create Uses

func (c *Command) Create() error

type License Uses

type License struct {
    Name            string   // The type of license in use
    PossibleMatches []string // Similar names to guess
    Text            string   // License text data
    Header          string   // License header for source files
}

License represents a software license agreement, containing the Name of the license, its possible matches (on the command line as given to cobra), the header to be used with each file on the file's creating, and the text of the license

type Project Uses

type Project struct {
    // v2
    PkgName      string
    Copyright    string
    AbsolutePath string
    Legal        License
    Viper        bool
    AppName      string
}

Project contains name, license and paths to projects.

func (*Project) Create Uses

func (p *Project) Create() error

Package cmd imports 15 packages (graph) and is imported by 44 packages. Updated 2019-09-17. Refresh now. Tools for package owners.