cli

package
v0.0.0-...-900104f Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAllowedPairFlagValues = errors.New("only `set` or `unset` are allowed")

Functions

func ParseMessageSeq

func ParseMessageSeq(seq *imap.SeqSet, data string) error

func PrettyPrint

func PrettyPrint(i interface{}) string

PrettyPrint returns a string with nice formatting for structs and JSON-serializable objects

func Usage

func Usage(w io.Writer, info ProgramInfo)

Types

type AbsTimeFlag

type AbsTimeFlag struct {
	*time.Time
}

func NewAbsTimeFlag

func NewAbsTimeFlag() AbsTimeFlag

func (AbsTimeFlag) Set

func (t AbsTimeFlag) Set(s string) error

func (*AbsTimeFlag) String

func (t *AbsTimeFlag) String() string

type Command

type Command interface {
	Func([]string) error
	Help(io.Writer, *flag.FlagSet)
}

type CommandMap

type CommandMap map[string]Command

type GlobalOpts

type GlobalOpts struct {
	ConfigPath   string
	Debug        bool
	ConfigStanza string
}

func (GlobalOpts) String

func (o GlobalOpts) String() string

type Pair

type Pair struct {
	Set, Unset bool
}

func (Pair) String

func (p Pair) String() string

type PairFlag

type PairFlag struct {
	*Pair
}

func NewPairFlag

func NewPairFlag() PairFlag

func (PairFlag) Set

func (pf PairFlag) Set(s string) error

func (PairFlag) String

func (pf PairFlag) String() string

type ProgramInfo

type ProgramInfo struct {
	Name     string
	Opts     GlobalOpts
	Commands CommandMap
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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