flags

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

flag pkg extension.

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 WithDescriptionBuilder added in v0.3.5

func WithDescriptionBuilder(f func(printlnf func(v string, args ...any)))

func WithExtra

func WithExtra(s string)

func WithExtraBuilder added in v0.3.5

func WithExtraBuilder(f func(printlnf func(v string, args ...any)))

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