Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - func AddJSONFlags(cmd *cobra.Command, exportTarget *Exporter, fields []string)
 - func CheckAuth(cfg config.Config) bool
 - func DetermineEditor(cf func() (config.Config, error)) (string, error)
 - func DisableAuthCheck(cmd *cobra.Command)
 - func EnableRepoOverride(cmd *cobra.Command, f *Factory)
 - func ExactArgs(n int, msg string) cobra.PositionalArgs
 - 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 OverrideBaseRepoFunc(f *Factory, override string) func() (ghrepo.Interface, 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 AddJSONFlags ¶ added in v1.9.0
func DetermineEditor ¶ added in v0.12.0
TODO: consider passing via Factory TODO: support per-hostname settings
func DisableAuthCheck ¶ added in v0.12.0
func EnableRepoOverride ¶ added in v0.12.0
func IsAuthCheckEnabled ¶ added in v0.12.0
func IsUserCancellation ¶ added in v1.7.0
func MinimumArgs ¶ added in v1.2.1
func MinimumArgs(n int, msg string) cobra.PositionalArgs
func MutuallyExclusive ¶ added in v1.7.0
func NoArgsQuoteReminder ¶ added in v0.10.1
func OverrideBaseRepoFunc ¶ added in v1.12.0
Types ¶
type Factory ¶
type Factory struct {
	IOStreams *iostreams.IOStreams
	Browser   Browser
	HttpClient func() (*http.Client, error)
	BaseRepo   func() (ghrepo.Interface, error)
	Remotes    func() (context.Remotes, error)
	Config     func() (config.Config, error)
	Branch     func() (string, error)
	ExtensionManager extensions.ExtensionManager
	// Executable is the path to the currently invoked gh binary
	Executable string
}
    type FlagError ¶
type FlagError struct {
	Err error
}
    FlagError is the kind of error raised in flag processing
type JSONFlagError ¶ added in v1.9.0
type JSONFlagError struct {
	// contains filtered or unexported fields
}
    type TestBrowser ¶ added in v1.8.0
type TestBrowser struct {
	// contains filtered or unexported fields
}
    func (*TestBrowser) Browse ¶ added in v1.8.0
func (b *TestBrowser) Browse(url string) error
func (*TestBrowser) BrowsedURL ¶ added in v1.8.0
func (b *TestBrowser) BrowsedURL() string
func (*TestBrowser) Verify ¶ added in v1.8.0
func (b *TestBrowser) Verify(t _testing, url string)
 Click to show internal directories. 
   Click to hide internal directories.