Versions in this module Expand all Collapse all v0 v0.1.4 Feb 7, 2023 v0.1.3 Feb 5, 2023 v0.1.2 Feb 5, 2023 v0.1.1 Feb 5, 2023 v0.1.0 Feb 5, 2023 v0.0.2 Feb 5, 2023 v0.0.1 Feb 3, 2023 Changes in this version + var ErrAlreadyExists = errors.New("already exists") + var ErrGoVersionNotSupported = fmt.Errorf("go version is not supported, gt requires at least %s", minGoVersion) + var ErrMalformedInput = errors.New("malformed input") + var ErrParameterNotSet = errors.New("parameter not set") + var ErrParameterSet = errors.New("parameter set but has no effect in this context") + type BoolValue bool + func (v BoolValue) Value(_ *OptionValues) bool + type BoolValuer interface + Value func(vals *OptionValues) bool + type Category struct + Name string + Options []Option + type DynamicBoolValue func(vals *OptionValues) bool + func (f DynamicBoolValue) Value(vals *OptionValues) bool + type DynamicStringValue func(vals *OptionValues) string + func (f DynamicStringValue) Value(vals *OptionValues) string + type DynamicValue func(vals *OptionValues) interface + func (f DynamicValue) Value(vals *OptionValues) interface{} + type ErrInvalidPattern struct + Description string + Pattern string + Value string + func (e *ErrInvalidPattern) Error() string + type ErrOutOfRange struct + Max int + Min int + Value int + func (e *ErrOutOfRange) Error() string + type ErrTypeMismatch struct + Actual string + Expected string + func (e *ErrTypeMismatch) Error() string + type GT struct + FuncMap template.FuncMap + GithubTagLister repos.GithubTagLister + Options *Options + func New() *GT + func (gt *GT) CheckVersion() + func (gt *GT) InitNewProject(opts *NewRepositoryOptions) (err error) + func (gt *GT) LoadConfigValuesFromFile(file string) (*OptionValues, error) + func (gt *GT) LoadConfigValuesInteractively() (*OptionValues, error) + func (gt *GT) PrintVersion() + type NewOptionOption func(*Option) + func WithPosthook(postHook PostHookFunc) NewOptionOption + func WithShouldDisplay(shouldDisplay BoolValuer) NewOptionOption + func WithValidator(validator Validator) NewOptionOption + type NewRepositoryOptions struct + OptionValues *OptionValues + OutputDir string + func (opts NewRepositoryOptions) Validate() error + type Option struct + func NewOption(name, description string, defaultValue Valuer, opts ...NewOptionOption) Option + func (s *Option) Default(currentValues *OptionValues) interface{} + func (s *Option) Description() string + func (s *Option) Name() string + func (s *Option) PostHook(v interface{}, optionValues *OptionValues, targetDir string) error + func (s *Option) ShouldDisplay(currentValues *OptionValues) bool + func (s *Option) Validate(value interface{}) error + type OptionNameToValue map[string]interface + type OptionValues struct + Base OptionNameToValue + Extensions map[string]OptionNameToValue + func NewOptionValues() *OptionValues + type Options struct + Base []Option + Extensions []Category + func NewOptions(githubTagLister repos.GithubTagLister) *Options + type PostHookFunc func(value interface{}, optionValues *OptionValues, targetDir string) error + type Streams struct + Err io.Writer + InScanner *bufio.Scanner + Out io.Writer + type StringValue string + func (v StringValue) Value(_ *OptionValues) string + type StringValuer interface + Value func(vals *OptionValues) string + type Validator interface + Validate func(value interface{}) error + type ValidatorFunc func(value interface{}) error + func (f ValidatorFunc) Validate(value interface{}) error + func RangeValidator(min, max int) ValidatorFunc + func RegexValidator(pattern, description string) ValidatorFunc + type Value struct + func StaticValue(v interface{}) *Value + func (v *Value) Value(_ *OptionValues) interface{} + type Valuer interface + Value func(vals *OptionValues) interface{}