cli

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultUsageFunc

func DefaultUsageFunc(sf *SortedFlags, c *ffcli.Command) string

This is mostly copied from ffcli package

func Start

func Start(cfg *config.Config) error

Types

type SortedFlags

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

SortedFlags is needed because by default there's no way to provide order for flags

this is kind of an ugly workaround

func NewSortedFlags

func NewSortedFlags(obj interface{}, fs *flag.FlagSet) *SortedFlags

func PopulateFlagSet

func PopulateFlagSet(obj interface{}, flagSet *flag.FlagSet, skip ...string) *SortedFlags

this is mostly reflection magic

func (*SortedFlags) Len

func (sf *SortedFlags) Len() int

func (*SortedFlags) Less

func (sf *SortedFlags) Less(i, j int) bool

func (*SortedFlags) Swap

func (sf *SortedFlags) Swap(i, j int)

func (*SortedFlags) VisitAll

func (sf *SortedFlags) VisitAll(cb func(*flag.Flag))

Jump to

Keyboard shortcuts

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