Documentation ¶
Index ¶
- Variables
- func AddJSONFlags(cmd *cobra.Command, exportTarget *Exporter, fields []string)
- func CheckAuth(cfg config.Config) bool
- func DisableAuthCheck(cmd *cobra.Command)
- func ExactArgs(n int, msg string) cobra.PositionalArgs
- func FlagErrorWrap(err error) error
- func FlagErrorf(format string, args ...interface{}) error
- func GenTable(columns []string, data [][]string) string
- func IsAuthCheckEnabled(cmd *cobra.Command) bool
- func IsUserCancellation(err error) bool
- func MinimumArgs(n int, msg string) cobra.PositionalArgs
- func MutuallyExclusive(message string, conditions ...bool) error
- func NoArgsQuoteReminder(cmd *cobra.Command, args []string) error
- func P(io *iostreams.IOStreams, txt string, args ...interface{})
- func PrintMarkdown(io *iostreams.IOStreams, md string) error
- func ReadFile(filename string, stdin io.ReadCloser) ([]byte, error)
- type Browser
- type Exporter
- type Factory
- type FlagError
- type JSONFlagError
- type TestBrowser
Constants ¶
This section is empty.
Variables ¶
View Source
var CancelError = errors.New("CancelError")
CancelError signals user-initiated cancellation
View Source
var SilentError = errors.New("SilentError")
SilentError is an error that triggers exit code 1 without any error messaging
Functions ¶
func CheckAuth ¶
CheckAuth checks if the default hostname has an access token assigned (without validating it).
func DisableAuthCheck ¶
func FlagErrorWrap ¶
FlagError returns a new FlagError that wraps the specified error.
func FlagErrorf ¶
FlagErrorf returns a new FlagError that wraps an error produced by fmt.Errorf(format, args...).
func IsAuthCheckEnabled ¶
func IsUserCancellation ¶
func MinimumArgs ¶
func MinimumArgs(n int, msg string) cobra.PositionalArgs
func MutuallyExclusive ¶
Types ¶
type FlagError ¶
type FlagError struct {
// contains filtered or unexported fields
}
A *FlagError indicates an error processing command-line flags or other arguments. Such errors cause the application to display the usage message.
type JSONFlagError ¶
type JSONFlagError struct {
// contains filtered or unexported fields
}
type TestBrowser ¶
type TestBrowser struct {
// contains filtered or unexported fields
}
func (*TestBrowser) Browse ¶
func (b *TestBrowser) Browse(url string) error
func (*TestBrowser) BrowsedURL ¶
func (b *TestBrowser) BrowsedURL() string
func (*TestBrowser) Verify ¶
func (b *TestBrowser) Verify(t _testing, url string)
Click to show internal directories.
Click to hide internal directories.