flags

package
v0.3.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(name string, value bool, usage string, required bool) *bool

func Duration

func Duration(name string, value time.Duration, usage string, required bool) *time.Duration

func Float64

func Float64(name string, value float64, usage string, required bool) *float64

func Int

func Int(name string, value int, usage string, required bool) *int

func Parse

func Parse()

func String

func String(name string, value string, usage string, required bool) *string

func WithDescription

func WithDescription(s string)

func WithExtra

func WithExtra(s string)

Types

type FlagInfo

type FlagInfo struct {
	Ptr      any
	Name     string
	Required bool
	Set      bool
}

type StrSliceFlag added in v0.3.0

type StrSliceFlag []string

func StrSlice

func StrSlice(name string, usage string, required bool) *StrSliceFlag

func (*StrSliceFlag) Set added in v0.3.0

func (s *StrSliceFlag) Set(t string) error

func (*StrSliceFlag) String added in v0.3.0

func (s *StrSliceFlag) String() string

Jump to

Keyboard shortcuts

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