flag

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 10 Imported by: 1

Documentation

Overview

Package flag provides flags support for uconfig

Index

Constants

View Source
const (
	ContinueOnError = ErrorHandling(flag.ContinueOnError)
	ExitOnError     = ErrorHandling(flag.ExitOnError)
	PanicOnError    = ErrorHandling(flag.PanicOnError)
)

These constants cause FlagSet.Parse to behave as described if the parse fails.

Variables

This section is empty.

Functions

func IsCommand added in v0.8.0

func IsCommand(f flat.Field) bool

Indicates whatever the field is "command" field. Used by usage and maybe used for other plugins to exclude command.

func New

func New(name string, errorHandling ErrorHandling, args []string) plugins.Plugin

New returns a new Flags

func Standard

func Standard() plugins.Plugin

Standard returns a set of flags configured in the common way. It is same as: `New(os.Args[0], ContinueOnError, os.Args[1:])`

Types

type ErrorHandling

type ErrorHandling flag.ErrorHandling

ErrorHandling defines how FlagSet.Parse behaves if the parse fails.

Jump to

Keyboard shortcuts

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