Documentation ¶
Index ¶
- Constants
- Variables
- func BehaviorOnFatal(f func(string, int))
- func CheckErr(err error)
- func CombineRequestErr(resp gorequest.Response, body string, errs []error) error
- func DefaultBehaviorOnFatal()
- func GetFlagBool(cmd *cobra.Command, flag string) bool
- func GetFlagDuration(cmd *cobra.Command, flag string) time.Duration
- func GetFlagInt(cmd *cobra.Command, flag string) int
- func GetFlagInt64(cmd *cobra.Command, flag string) int64
- func GetFlagString(cmd *cobra.Command, flag string) string
- func GetFlagStringArray(cmd *cobra.Command, flag string) []string
- func GetFlagStringSlice(cmd *cobra.Command, flag string) []string
- func GetWideFlag(cmd *cobra.Command) bool
- func IsFilenameEmpty(filenames []string) bool
- func StandardErrorMessage(err error) (string, bool)
- func UsageErrorf(cmd *cobra.Command, format string, args ...interface{}) error
- type Factory
Constants ¶
View Source
const (
DefaultErrorExitCode = 1
)
View Source
const (
RecommendedHomeDir = ".grape"
)
Variables ¶
View Source
var ErrExit = fmt.Errorf("exit")
Functions ¶
func BehaviorOnFatal ¶
func CombineRequestErr ¶
func DefaultBehaviorOnFatal ¶
func DefaultBehaviorOnFatal()
func GetFlagInt ¶
Assumes the flag has a default value.
func GetFlagInt64 ¶
Assumes the flag has a default value.
func GetFlagStringArray ¶
GetFlagStringArray can be used to accept multiple argument with flag repetition (e.g. -f arg1 -f arg2 ...)
func GetFlagStringSlice ¶
GetFlagStringSlice can be used to accept multiple argument with flag repetition (e.g. -f arg1,arg2 -f arg3 ...)
func GetWideFlag ¶
GetWideFlag is used to determine if "-o wide" is used
func IsFilenameEmpty ¶
func StandardErrorMessage ¶
Types ¶
type Factory ¶
type Factory struct { Server string Timeout int Username string Password string Cool bool // contains filtered or unexported fields }
func NewFactory ¶
func NewFactory() Factory
func (*Factory) BindExternalFlags ¶
func (*Factory) Gorequest ¶
func (f *Factory) Gorequest() *gorequest.SuperAgent
Click to show internal directories.
Click to hide internal directories.