flagzog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateFlags

func ValidateFlags(ctx context.Context, logger *slog.Logger, flags []FlagValidator) ([]string, error)

Types

type BoolFlag

type BoolFlag struct {
	Value bool
	// contains filtered or unexported fields
}

func NewBoolFlag

func NewBoolFlag(name string, schema *zog.BoolSchema[bool], usage string) BoolFlag

func (BoolFlag) Name

func (f BoolFlag) Name() string

func (BoolFlag) Usage

func (f BoolFlag) Usage() string

func (BoolFlag) Validate

func (f BoolFlag) Validate() ([]string, error)

type FlagValidator

type FlagValidator interface {
	Name() string
	Validate() ([]string, error)
	Usage() string
}

type Int64Flag

type Int64Flag struct {
	Value int64
	// contains filtered or unexported fields
}

func NewInt64Flag

func NewInt64Flag(name string, schema *zog.NumberSchema[int64], usage string) Int64Flag

func (Int64Flag) Name

func (f Int64Flag) Name() string

func (Int64Flag) Usage

func (f Int64Flag) Usage() string

func (Int64Flag) Validate

func (f Int64Flag) Validate() ([]string, error)

type StringFlag

type StringFlag struct {
	Value string
	// contains filtered or unexported fields
}

func NewStringFlag

func NewStringFlag(name string, schema *zog.StringSchema[string], usage string) StringFlag

func (StringFlag) Name

func (f StringFlag) Name() string

func (StringFlag) Usage

func (f StringFlag) Usage() string

func (StringFlag) Validate

func (f StringFlag) Validate() ([]string, error)

Jump to

Keyboard shortcuts

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