Documentation
¶
Overview ¶
Package configuration is where all program's input flags are specified. It is also where their validation happens.
Usage ¶
Instantiate a new GlifParameters object at the beginning and use it like so:
GO CODE -------------------------------------------------- glifParam := GlifParameters{}
if ok := glifParam.Parse(); !ok { panic("failed to properly parse input flags") }
// Program can run using valide input flags ------------------------------------------------------------ The Parse() method will call the flag.String(), flag.Bool(), etc... to set all necessary values Finally a call to the methode validate() is made and it's where application-related validation happen.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlifFlags ¶
GlifFlags contains the various boolean flags (actual command line flags and not parameters) used by glif.
type GlifParameters ¶
type GlifParameters struct { Script *string Tickets *string Flags GlifFlags Scripts GlifPreConfiguredScripts UserSpecifiedScript string }
GlifParameters contains the various flags that were given via the program's input paramters It also contains an instance of GlifFlags and GlifPreConfiguredScripts
- see: configuration.GlifFlags
- see: configuration.GlifPreConfiguredScripts
func (*GlifParameters) Parse ¶
func (params *GlifParameters) Parse(forceRepl bool) bool
Parse encapsulate the function calls to the Go flag package. It also internally runs an application-related validation.
type GlifPreConfiguredScripts ¶
type GlifPreConfiguredScripts struct { UseDiffLatestSemverWithLatestBuilds *bool UseDiffLatestSemverWithLatestRCs *bool UseDiffLatestSemver *bool UseDiffLatestSemverToHead *bool UseUserSpecifiedScript *bool }
GlifPreConfiguredScripts contains only boolean flags that specify if a "preconfigured" script should be used.
- see script package