Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BuildDate = "" // YYYY-MM-DD
BuildDate is dynamically set at build time in the Makefile.
var Confirm = func(prompt string, result *bool) error { p := &survey.Confirm{ Message: prompt, Default: true, } return survey.AskOne(p, result) }
var RootCmd = &cobra.Command{ Use: "gh", Short: "GitHub CLI", Long: `Work seamlessly with GitHub from the command line. GitHub CLI is in early stages of development, and we'd love to hear your feedback at <https://forms.gle/umxd3h31c7aMQFKG7>`, SilenceErrors: true, SilenceUsage: true, }
RootCmd is the entry point of command-line execution
var SurveyAsk = func(qs []*survey.Question, response interface{}, opts ...survey.AskOpt) error { return survey.Ask(qs, response, opts...) }
var Version = "DEV"
Version is dynamically set by the toolchain or overridden by the Makefile.
Functions ¶
func BasicClient ¶
BasicClient returns an API client that borrows from but does not depend on user configuration
Types ¶
type CmdStubber ¶ added in v0.6.2
type CmdStubber struct {
Stubs []*test.OutputStub
Count int
Calls []*exec.Cmd
}
TODO this is split between here and test/helpers.go. I did that because otherwise our test package would have to import utils (for utils.Runnable) which felt wrong. while utils_test currently doesn't import test helpers, i don't see why that ought to be precluded. I'm wondering if this is a case for having a global package just for storing Interfaces.
func (*CmdStubber) Stub ¶ added in v0.6.2
func (cs *CmdStubber) Stub(desiredOutput string)
type FlagError ¶
type FlagError struct {
Err error
}
FlagError is the kind of error raised in flag processing