Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalOpts = GlobalOptions{ Verbosity: 0, Quiet: false, Accessible: false, }
The global options for the CLI
View Source
var NewOpts = NewOptions{ Repo: *types.NewValueGuard("", cmdOpt, types.REPO), Source: *types.NewValueGuard("", cmdOpt, types.REPO), Branch: *types.NewValueGuard("", cmdOpt, types.BRANCH), Directory: *types.NewValueGuard("", cmdOpt, types.PATH), Name: *types.NewValueGuard("", cmdOpt, types.STRING), License: *types.NewValueGuard("", cmdOpt, types.STRING), Style: *types.NewValueGuard("", cmdOpt, types.STRING), NoGit: false, NoLicense: false, AllowSpaces: false, }
The options for the new command
Functions ¶
This section is empty.
Types ¶
type GlobalOptions ¶
type NewOptions ¶
type NewOptions struct { // The repository Url to use // Should be this repository by default Repo types.ValueGuard[string] // The repository Url or local path to use // Should be this repository by default Source types.ValueGuard[string] // The branch to use Branch types.ValueGuard[string] // The directory of the template to use Directory types.ValueGuard[string] // The name of your project Name types.ValueGuard[string] // The license of your project License types.ValueGuard[string] // The style to use Style types.ValueGuard[string] // Whether to skip initializing git NoGit bool // Whether to skip initializing license NoLicense bool // Whether to allow spaces in the project name // This will skip replacing them with hyphens AllowSpaces bool }
func (*NewOptions) CloneRepo ¶
func (o *NewOptions) CloneRepo() (string, error)
To clone the repository
func (*NewOptions) GetSource ¶ added in v0.7.0
func (o *NewOptions) GetSource() (string, error)
GetSource returns the source directory path that is either cloned with Git or is local.
If it is a Git cloned path, it will be cleaned
func (*NewOptions) Validate ¶
func (o *NewOptions) Validate() error
TO be invoked before a command is ran
Click to show internal directories.
Click to hide internal directories.