cmd

package
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Licenses = make(map[string]License)

Licenses contains all possible licenses a user can choose from.

Functions

func Execute

func Execute() error

Execute executes the root command.

Types

type Command

type Command struct {
	CmdName   string
	CmdParent string
	*Project
}

func (*Command) Create

func (c *Command) Create() error

type CurDir

type CurDir struct {
	Dir string
}

type License

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 Mod

type Mod struct {
	Path, Dir, GoMod string
}

type Project

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

Project contains name, license and paths to projects.

func (*Project) Create

func (p *Project) Create() error

func (*Project) GetCmdPath

func (p *Project) GetCmdPath() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL