cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringMap

type StringMap struct {
	// contains filtered or unexported fields
}

StringMap implements the Value and ValueCreator interfaces for string maps.

func (StringMap) Create

func (s StringMap) Create(v map[string]string, p *map[string]string, _ StringMapConfig) cli.Value

Create implements the ValueCreator interface.

func (*StringMap) Get

func (s *StringMap) Get() any

Get implements the flag.Value interface.

func (*StringMap) Set

func (s *StringMap) Set(v string) error

Set implements the flag.Value interface.

func (*StringMap) String

func (s *StringMap) String() string

String implements the flag.Value interface.

func (StringMap) ToString

func (s StringMap) ToString(v map[string]string) string

ToString implements the ValueCreator interface.

type StringMapConfig

type StringMapConfig struct {
}

StringMapConfig defines the configuration for string map flags.

type StringMapFlag

type StringMapFlag = cli.FlagBase[map[string]string, StringMapConfig, StringMap]

StringMapFlag is a flag type which supports JSON string maps.

type StringSlice

type StringSlice struct {
	// contains filtered or unexported fields
}

StringSlice implements the Value and ValueCreator interfaces for string slices.

func (StringSlice) Create

func (s StringSlice) Create(v []string, p *[]string, c StringSliceConfig) cli.Value

Create implements the ValueCreator interface.

func (*StringSlice) Get

func (s *StringSlice) Get() any

Get implements the flag.Value interface.

func (*StringSlice) Set

func (s *StringSlice) Set(v string) error

Set implements the flag.Value interface.

func (*StringSlice) String

func (s *StringSlice) String() string

String implements the flag.Value interface.

func (StringSlice) ToString

func (s StringSlice) ToString(v []string) string

ToString implements the ValueCreator interface.

type StringSliceConfig

type StringSliceConfig struct {
	Delimiter    string
	EscapeString string
}

StringConfig defines the configuration for string flags.

type StringSliceFlag

type StringSliceFlag = cli.FlagBase[[]string, StringSliceConfig, StringSlice]

StringSliceFlag is a flag type which support comma separated values and escaping to not split at unwanted lines.

Jump to

Keyboard shortcuts

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