Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AppNameArg = AvailableArgument{ Parameter: "name", Description: "Set the name of the project", Argument: "<string>", } LicenseArg = AvailableArgument{ Parameter: "license", Description: "Set the license of the project", Argument: "<string>", } YearArg = AvailableArgument{ Parameter: "year", Description: "Set the year", Argument: "<int|string>", } AuthorsArg = AvailableArgument{ Parameter: "authors", Description: "Set the authors of the project, separate them with the coma (,)", Argument: "[string,]", } ConfigPath = AvailableArgument{ Parameter: "config-path", Description: "Set a path to the config for using custom licenses", Argument: "string", } HelpArg = InfoArgument{ Parameter: "h", Description: "Show the help", // contains filtered or unexported fields } LicenseListArg = InfoArgument{ Parameter: "l", Description: "List every available license", // contains filtered or unexported fields } VerboseArg = OtherArgument{ Parameter: "v", Description: "Verbose mode", } )
Functions ¶
func AddLicense ¶
Types ¶
type Arguments ¶
type Arguments struct { AppName string LicenseType *License Years string Authors []string ConfigPath string Question bool Info bool InfoText func() string }
func ParseCliArgs ¶
func ParseCliArgs() *Arguments
func (*Arguments) HandleArgs ¶
func (arg *Arguments) HandleArgs()
type AvailableArgument ¶
func (*AvailableArgument) GenerateParameter ¶
func (arg *AvailableArgument) GenerateParameter() string
GenerateParameter Generate the full parameter
type InfoArgument ¶
type InfoArgument struct { Parameter string Description string // contains filtered or unexported fields }
func (*InfoArgument) GenerateParameter ¶
func (arg *InfoArgument) GenerateParameter() string
func (*InfoArgument) GenerateText ¶
func (arg *InfoArgument) GenerateText() string
type License ¶
func GetLicense ¶
type OtherArgument ¶
func (*OtherArgument) GenerateParameter ¶
func (arg *OtherArgument) GenerateParameter() string
Click to show internal directories.
Click to hide internal directories.