cmd

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Code generated by BuilderGen v0.2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUsage

func GetUsage(formatPrinter PrinterFn)

GetUsage prints the help message for BuilderGen.

Types

type BuilderGenConfig added in v0.2.0

type BuilderGenConfig struct {
	Configs []*Config `yaml:"configs"`
}

type Config

type Config struct {
	Source         string `yaml:"source"`
	Destination    string `yaml:"destination"`
	Package        string `yaml:"package"`
	Name           string `yaml:"name"`
	WithValidation bool   `yaml:"with-validation"`
}

func NewConfig

func NewConfig(src, dst, pkg, name string, validation bool) (*Config, error)

NewConfig creates a new config with the given arguments. It also initializes the default values config arguments.

func ParseConfigFile added in v0.2.0

func ParseConfigFile(configFile string) ([]*Config, error)

func (*Config) FillDefaults added in v0.2.0

func (c *Config) FillDefaults() (*Config, error)

type ConfigBuilder

type ConfigBuilder struct {
	Source         string `yaml:"source"`
	Destination    string `yaml:"destination"`
	Package        string `yaml:"package"`
	Name           string `yaml:"name"`
	WithValidation bool   `yaml:"with-validation"`
}

func NewConfigBuilder

func NewConfigBuilder(b *Config) *ConfigBuilder

func (*ConfigBuilder) Build

func (b *ConfigBuilder) Build() *Config

func (*ConfigBuilder) WithDestination

func (b *ConfigBuilder) WithDestination(destination string) *ConfigBuilder

func (*ConfigBuilder) WithName

func (b *ConfigBuilder) WithName(name string) *ConfigBuilder

func (*ConfigBuilder) WithPackage

func (b *ConfigBuilder) WithPackage(package_ string) *ConfigBuilder

func (*ConfigBuilder) WithSource

func (b *ConfigBuilder) WithSource(source string) *ConfigBuilder

func (*ConfigBuilder) WithWithValidation added in v0.1.0

func (b *ConfigBuilder) WithWithValidation(withValidation bool) *ConfigBuilder

type PrinterFn added in v0.0.2

type PrinterFn func(string, ...any) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL