flag

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package flag need for convenient get object flag from lib cli.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIntFlag

func NewIntFlag(name, usage string, options ...OptionInt) *cli.IntFlag

NewIntFlag create new IntFlag by options.

func NewStrFlag

func NewStrFlag(name, usage string, options ...OptionString) *cli.StringFlag

NewStrFlag create new StringFlag by options.

Types

type OptionInt

type OptionInt func(f *cli.IntFlag)

OptionInt params for build int flag.

func IntAliases

func IntAliases(values ...string) OptionInt

IntAliases set aliases for IntFlag.

func IntDefault

func IntDefault(value int) OptionInt

IntDefault set default value for IntFlag.

func IntEnv

func IntEnv(values ...string) OptionInt

IntEnv set env name for IntEnv.

func IntRequired

func IntRequired() OptionInt

IntRequired set flag mandatory for IntFlag.

type OptionString

type OptionString func(f *cli.StringFlag)

OptionString params for build string flag.

func StrAliases

func StrAliases(values ...string) OptionString

StrAliases set aliases for StringFlag.

func StrDefault

func StrDefault(value string) OptionString

StrDefault set default value for StringFlag.

func StrEnv

func StrEnv(values ...string) OptionString

StrEnv set env name for StringFlag.

func StrRequired

func StrRequired() OptionString

StrRequired set flag mandatory for StringFlag.

Jump to

Keyboard shortcuts

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