altflag

package module
v0.0.0-...-4c94236 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 3 Imported by: 0

README

altflag

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlagSet

type FlagSet interface {
	Name() string
	Parse(args []string) error
	BoolVar(target *bool, displayName string, shortFlag string, usage string) (TargetVariable[bool], error)
	CountVar(target *int, displayName string, shortFlag string, usage string, maxAllowed int) (TargetVariable[int], error)
	StringVar(target *string, displayName string, shortFlag string, usage string) (TargetVariable[string], error)
}

func NewFlagSet

func NewFlagSet(name string) FlagSet

type TargetVariable

type TargetVariable[T any] interface {
	DisplayName() string
	SetDefault(defaultValue T)
	SetValue(value T)
	Value() T
}

Jump to

Keyboard shortcuts

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