Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Licenses = make(map[string]License)
Licenses contains all possible licenses a user can choose from.
Functions ¶
Types ¶
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 Project ¶
type Project struct {
// contains filtered or unexported fields
}
Project contains name, license and paths to projects.
func NewProject ¶
NewProject returns Project with specified project name. If projectName is blank string, it returns nil.
func NewProjectFromPath ¶
NewProjectFromPath returns Project with specified absolute path to package. If absPath is blank string or if absPath is not actually absolute, it returns nil.
func (*Project) CmdPath ¶
CmdPath returns absolute path to directory, where all commands are located.
CmdPath returns blank string, only if p.AbsPath() is a blank string.