Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Templates struct { Commit string `json:"commit" yaml:"commit" validate:"required"` Changelog string `json:"changelog" yaml:"changelog" validate:"-"` } `json:"templates" yaml:"templates"` Args []struct { Name string `json:"name,omitempty" yaml:"name" validate:"required"` Options []Option `json:"options,omitempty" yaml:"options" validate:"-"` Required bool `json:"required,omitempty" yaml:"required,omitempty" validate:"-"` Width int `json:"width,omitempty" yaml:"width" validate:"omitempty,gte=0"` } `json:"args,omitempty" yaml:"args" validate:"gt=0"` }
Config contains structure of configuration file.
func NewFromFile ¶
NewFromFile returns configuration from file with given path.
func (*Config) RequiredArgs ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder decodes app's configuration from file.
Supported extensions: - yaml, yml - json
func NewDecoder ¶
NewDecoder creates new decoder that decodes configuration file.
type Option ¶
type Option struct { Value string `json:"value" yaml:"value" validate:"required"` Description string `json:"description" yaml:"description" validate:""` Version string `json:"version" yaml:"version" validate:"oneof=major minor patch"` }
Option is an option for selection prompt where value fills provided in template field and version specifies its impact on semver version.
Click to show internal directories.
Click to hide internal directories.