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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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