Documentation
¶
Index ¶
- func HasInstall(ctx context.Context, language core.Language, version goversion.Version) (error, bool)
- type Language
- func (l *Language) GetDefaultVersion() *core.InstalledVersion
- func (l *Language) ListInstalledVersions(ctx context.Context, binPath string) ([]*core.InstalledVersion, error)
- func (l *Language) SetDefaultVersion(ctx context.Context, version string, envs []env.KV) error
- func (l *Language) Uninstall(version string) error
- type PackageSuffix
- type PackageSuffixes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Language ¶
type Language struct {
// contains filtered or unexported fields
}
Language 默认方法
func NewLanguage ¶
func (*Language) GetDefaultVersion ¶
func (l *Language) GetDefaultVersion() *core.InstalledVersion
func (*Language) ListInstalledVersions ¶
func (*Language) SetDefaultVersion ¶
type PackageSuffix ¶
type PackageSuffix string
const ( Tar PackageSuffix = ".tar.gz" Zip PackageSuffix = ".zip" Pkg PackageSuffix = ".pkg" )
func (PackageSuffix) Composition ¶
func (p PackageSuffix) Composition(name string) string
func (PackageSuffix) String ¶
func (p PackageSuffix) String() string
type PackageSuffixes ¶
type PackageSuffixes []PackageSuffix
var AllSuffix PackageSuffixes = []PackageSuffix{Tar, Zip, Pkg}
func (PackageSuffixes) GetSuffix ¶
func (p PackageSuffixes) GetSuffix(packageName string) PackageSuffix
func (PackageSuffixes) Has ¶
func (p PackageSuffixes) Has(packageName string) bool
func (PackageSuffixes) Trim ¶
func (p PackageSuffixes) Trim(packageName string) string
Click to show internal directories.
Click to hide internal directories.