config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = &Config{
	PackageName:    "openapi2go",
	FileNameSuffix: ".zz_generated.go",
}

Functions

func CmdFlags

func CmdFlags(name string, opts *Flags) *pflag.FlagSet

func OutputFlag

func OutputFlag(flags *pflag.FlagSet, opts *Flags)

func Unmarshal

func Unmarshal(data []byte, config *Config) error

func Viper

func Viper(configFile string) *viper.Viper

Types

type Config

type Config struct {
	PackageName    string
	FileNameSuffix string
	Types          map[string]Type
}

func Must

func Must(config Config, err error) Config

func ReadFile

func ReadFile(fs afero.Fs, file string) (*Config, error)

func (Config) For

func (c Config) For(name string) *Type

type Field

type Field struct {
	Type string
}

func (*Field) TypeFor

func (c *Field) TypeFor(given string) string

type Flags

type Flags struct {
	Output string
}

type Type

type Type struct {
	Fields map[string]Field
}

func (*Type) For

func (t *Type) For(name string) *Field

Jump to

Keyboard shortcuts

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