builder

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0 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 ErrCantBuild = errors.New("cannot build")

Functions

func Singular

func Singular(s string) string

Types

type ClientBuilder

type ClientBuilder struct {
	// contains filtered or unexported fields
}

func NewClientBuilder

func NewClientBuilder(cfg Config) *ClientBuilder

func (*ClientBuilder) BuildFor

func (b *ClientBuilder) BuildFor(build *config.Config, client any)

func (*ClientBuilder) BuildMethod

func (b *ClientBuilder) BuildMethod(build *config.Config, m reflect.Method)

type Config

type Config struct {
	InputStructSuffix string

	// ReadFlagPrefix The prefix that read flags must have (removed in alias flag).
	ReadFlagPrefix string

	SkipFlags []string

	FlagOverrides map[string]config.Flag
	FlagReplaces  []string

	PriorityFields []string

	RequiredFromFieldPointer bool
	RequiredFromComment      func(string) bool
}

type MethodBuilder

type MethodBuilder struct {
	// contains filtered or unexported fields
}

func NewMethodBuilder

func NewMethodBuilder(cfg Config, build *config.Config, m reflect.Method) *MethodBuilder

func (*MethodBuilder) Build

func (b *MethodBuilder) Build() error

func (*MethodBuilder) Commit

func (b *MethodBuilder) Commit()

type SpecBuilder

type SpecBuilder struct {
	// contains filtered or unexported fields
}

func NewSpecBuilder

func NewSpecBuilder(cfg Config) *SpecBuilder

func (*SpecBuilder) BuildSpec

func (b *SpecBuilder) BuildSpec(base *config.Config, pkgNames ...string)

Jump to

Keyboard shortcuts

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