cfflags

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	FlagSet *flag.FlagSet
	// contains filtered or unexported fields
}

func New

func New(name string, flags []cli.Flag, c *cli.Context) (*Flags, error)

The purpose of this package is to allow the assume cli command to accept flags on either side of the "role" arg for example, `assume -c my-role -region=us-east-1` by default, urfav-cli, the cli framework that we are using does not support this usage pattern.

We have extracted some methods from the original urfav-cli library to mimic the original behaviour but processing all the flags. to use this in a command, This package interacts with os.Args directly

allFlags := cfflags.New("name",GlobalFlagsList, c) allFlags.String("region")

func (*Flags) Bool

func (set *Flags) Bool(name string) bool

func (*Flags) Int

func (set *Flags) Int(name string) int

func (*Flags) Int64

func (set *Flags) Int64(name string) int64

func (*Flags) String

func (set *Flags) String(name string) string

func (*Flags) StringSlice added in v0.1.8

func (set *Flags) StringSlice(name string) []string

Jump to

Keyboard shortcuts

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