github.com/andrewhsu/cli/v2@v2.0.1-0.20210910131313-d4b4061f5b89/pkg/cmdutil/factory.go (about) 1 package cmdutil 2 3 import ( 4 "net/http" 5 6 "github.com/andrewhsu/cli/v2/context" 7 "github.com/andrewhsu/cli/v2/internal/config" 8 "github.com/andrewhsu/cli/v2/internal/ghrepo" 9 "github.com/andrewhsu/cli/v2/pkg/extensions" 10 "github.com/andrewhsu/cli/v2/pkg/iostreams" 11 ) 12 13 type Browser interface { 14 Browse(string) error 15 } 16 17 type Factory struct { 18 IOStreams *iostreams.IOStreams 19 Browser Browser 20 21 HttpClient func() (*http.Client, error) 22 BaseRepo func() (ghrepo.Interface, error) 23 Remotes func() (context.Remotes, error) 24 Config func() (config.Config, error) 25 Branch func() (string, error) 26 27 ExtensionManager extensions.ExtensionManager 28 29 // Executable is the path to the currently invoked gh binary 30 Executable string 31 }