flag

package
v0.39.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Overview

Package flag provides some general-purpose types which satisfy the flag.Value interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowedStringFlag added in v0.17.0

type AllowedStringFlag struct {
	Allowed []string
	Value   *string
}

func (*AllowedStringFlag) Set added in v0.17.0

func (f *AllowedStringFlag) Set(v string) error

func (*AllowedStringFlag) String added in v0.17.0

func (f *AllowedStringFlag) String() string

type ExplicitFlag

type ExplicitFlag struct {
	IsSet *bool
	Value *string
}

ExplicitFlag is a string flag that tracks whether it was set.

func (*ExplicitFlag) Set

func (f *ExplicitFlag) Set(value string) error

func (*ExplicitFlag) String

func (f *ExplicitFlag) String() string

type MultiFlag

type MultiFlag struct {
	IsSet  *bool
	Values *[]string
}

MultiFlag collects repeated string flags into a slice.

func (*MultiFlag) Set

func (m *MultiFlag) Set(v string) error

func (*MultiFlag) String

func (m *MultiFlag) String() string

Jump to

Keyboard shortcuts

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