Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigCreator ¶
DefaultConfigCreator represents the default configuration creator that builds a Config instance using the values specified using the default flags.
func DefaultFlagSetup ¶
DefaultFlagSetup represents a ConfigFlagSetup that sets no flag other than the default ones.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config contains the configuration data for the init command
func (*Config) GetConfigCreator ¶
func (c *Config) GetConfigCreator() ConfigCreator
GetConfigCreator return the function that should be run to create a configuration from a set of flags specified by the user with the "init" command
func (*Config) GetConfigSetupFlag ¶
func (c *Config) GetConfigSetupFlag() ConfigFlagSetup
GetConfigSetupFlag return the function that should be run to setup the flags that will later be used to build a default instance of the configuration object
func (*Config) WithConfigCreator ¶
func (c *Config) WithConfigCreator(creator ConfigCreator) *Config
WithConfigCreator sets the given setup function as the configuration creator
func (*Config) WithConfigFlagSetup ¶
func (c *Config) WithConfigFlagSetup(setup ConfigFlagSetup) *Config
WithConfigFlagSetup sets the given setup function as the flag setup
type ConfigCreator ¶
ConfigCreator represents a function that builds a Config instance from the flags that have been specified by the user inside the given command.
type ConfigFlagSetup ¶
ConfigFlagSetup represents a function that will be called in order to setup all the flags for the "init" command. Here you should add any flag that might be used from the user in order to set default configuration values when initializing for the first time the configuration of the command.