Documentation
¶
Index ¶
- Constants
- type Adaptor
- type BrewAdaptor
- func (a *BrewAdaptor) ApplyOpFunc(fn OpFunc)
- func (a *BrewAdaptor) Install(ver string) error
- func (a *BrewAdaptor) List() error
- func (a *BrewAdaptor) Name() string
- func (a *BrewAdaptor) Switch(ver string) error
- func (a *BrewAdaptor) Uninstall(ver string) error
- func (a *BrewAdaptor) Update(ver string) error
- type CallOpts
- type GoEnvAdaptor
- func (a *GoEnvAdaptor) ApplyOpFunc(fn OpFunc)
- func (a *GoEnvAdaptor) Install(ver string) error
- func (a *GoEnvAdaptor) List() error
- func (a *GoEnvAdaptor) Name() string
- func (a *GoEnvAdaptor) Switch(ver string) error
- func (a *GoEnvAdaptor) Uninstall(ver string) error
- func (a *GoEnvAdaptor) Update(ver string) error
- type HandleFn
- type OpFunc
- type ScoopAdaptor
- func (a *ScoopAdaptor) ApplyOpFunc(fn OpFunc)
- func (a *ScoopAdaptor) Install(ver string) error
- func (a *ScoopAdaptor) List() error
- func (a *ScoopAdaptor) Name() string
- func (a *ScoopAdaptor) Switch(ver string) error
- func (a *ScoopAdaptor) Uninstall(ver string) error
- func (a *ScoopAdaptor) Update(ver string) error
- type StdAdaptor
- func (a *StdAdaptor) ApplyOpFunc(fn OpFunc)
- func (a *StdAdaptor) Install(ver string) error
- func (a *StdAdaptor) List() error
- func (a *StdAdaptor) Name() string
- func (a *StdAdaptor) Switch(ver string) error
- func (a *StdAdaptor) Uninstall(ver string) error
- func (a *StdAdaptor) Update(ver string) error
- func (a *StdAdaptor) WithOptions(fns ...OpFunc) *StdAdaptor
Constants ¶
View Source
const ( AdaptorAuto = "auto" AdaptorGoEnv = "goenv" AdaptorBrew = "brew" AdaptorScoop = "scoop" )
Adaptor name consts: scoop, winget
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adaptor ¶
type Adaptor interface { Name() string List() error ApplyOpFunc(fn OpFunc) Switch(ver string) error Install(ver string) error Update(ver string) error Uninstall(ver string) error }
Adaptor interface
type BrewAdaptor ¶
type BrewAdaptor struct {
// contains filtered or unexported fields
}
BrewAdaptor struct
func (*BrewAdaptor) Install ¶
func (a *BrewAdaptor) Install(ver string) error
Install go by given version
func (*BrewAdaptor) Switch ¶
func (a *BrewAdaptor) Switch(ver string) error
Switch go to given version
func (*BrewAdaptor) Uninstall ¶
func (a *BrewAdaptor) Uninstall(ver string) error
Uninstall go by given version
func (*BrewAdaptor) Update ¶
func (a *BrewAdaptor) Update(ver string) error
Update go by given version
type GoEnvAdaptor ¶
type GoEnvAdaptor struct {
// contains filtered or unexported fields
}
GoEnvAdaptor struct
func (*GoEnvAdaptor) Install ¶
func (a *GoEnvAdaptor) Install(ver string) error
func (*GoEnvAdaptor) List ¶
func (a *GoEnvAdaptor) List() error
func (*GoEnvAdaptor) Switch ¶
func (a *GoEnvAdaptor) Switch(ver string) error
func (*GoEnvAdaptor) Uninstall ¶
func (a *GoEnvAdaptor) Uninstall(ver string) error
func (*GoEnvAdaptor) Update ¶
func (a *GoEnvAdaptor) Update(ver string) error
type ScoopAdaptor ¶
type ScoopAdaptor struct {
// contains filtered or unexported fields
}
ScoopAdaptor struct
func (*ScoopAdaptor) Install ¶
func (a *ScoopAdaptor) Install(ver string) error
func (*ScoopAdaptor) List ¶
func (a *ScoopAdaptor) List() error
func (*ScoopAdaptor) Switch ¶
func (a *ScoopAdaptor) Switch(ver string) error
func (*ScoopAdaptor) Uninstall ¶
func (a *ScoopAdaptor) Uninstall(ver string) error
func (*ScoopAdaptor) Update ¶
func (a *ScoopAdaptor) Update(ver string) error
type StdAdaptor ¶
type StdAdaptor struct { ListFn func() error SwitchFn HandleFn InstallFn HandleFn UpdateFn HandleFn // UninstallFn handler UninstallFn HandleFn // contains filtered or unexported fields }
StdAdaptor struct
func (*StdAdaptor) Install ¶
func (a *StdAdaptor) Install(ver string) error
func (*StdAdaptor) List ¶
func (a *StdAdaptor) List() error
func (*StdAdaptor) Switch ¶
func (a *StdAdaptor) Switch(ver string) error
func (*StdAdaptor) Uninstall ¶
func (a *StdAdaptor) Uninstall(ver string) error
func (*StdAdaptor) Update ¶
func (a *StdAdaptor) Update(ver string) error
func (*StdAdaptor) WithOptions ¶
func (a *StdAdaptor) WithOptions(fns ...OpFunc) *StdAdaptor
Click to show internal directories.
Click to hide internal directories.