module

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package module package

Index

Constants

This section is empty.

Variables

View Source
var GolangReleases = []string{}/* 264 elements not displayed */

GolangReleases a list of golang releases

View Source
var SelectedValue string

SelectedValue the list selected value

Functions

func NewCharmSelect

func NewCharmSelect(title string, versions []string) *tea.Program

NewCharmSelect Creates a new instance of tea.Program

func NewCharmSpinner

func NewCharmSpinner(loadingMsg string) *tea.Program

NewCharmSpinner Creates a new instance of tea.Program

Types

type Golang

type Golang struct {
	RootPath       string
	EnvironmentDir string
	VersionsDir    string
	ShimsDir       string
	VersionFile    string
	FileSystem     *service.FileSystem
	Installer      *service.Installer
}

Golang type

func NewGolangEnvironment

func NewGolangEnvironment(homePath string) *Golang

NewGolangEnvironment creates a new instance

func (*Golang) Configure

func (g *Golang) Configure() error

Configure configures the environment

func (*Golang) GetGlobalVersion

func (g *Golang) GetGlobalVersion() (string, error)

GetGlobalVersion returns the global golang version

func (*Golang) GetInstalledVersions

func (g *Golang) GetInstalledVersions() ([]string, error)

GetInstalledVersions returns a list of installed versions

func (*Golang) GetLocalVersion

func (g *Golang) GetLocalVersion(dir string) (string, error)

GetLocalVersion returns the local golang version

func (*Golang) GetVersions

func (g *Golang) GetVersions() []string

GetVersions returns a list of all available versions

func (*Golang) Install

func (g *Golang) Install(version string) error

Install installs a golang version

func (*Golang) Rehash

func (g *Golang) Rehash() error

Rehash gets a list of binaries under a certain go bin directory and create shim for them

func (*Golang) SetGlobalVersion

func (g *Golang) SetGlobalVersion(version string) error

SetGlobalVersion sets the global golang version

func (*Golang) SetLocalVersion

func (g *Golang) SetLocalVersion(version string) error

SetLocalVersion sets the local golang version

func (*Golang) SetVersion

func (g *Golang) SetVersion(path, version string) error

SetVersion sets the local or global golang version

func (*Golang) Uninstall

func (g *Golang) Uninstall(version string) error

Uninstall removes a golang installed version

func (*Golang) ValidateInstalledVersion

func (g *Golang) ValidateInstalledVersion(version string) (bool, error)

ValidateInstalledVersion validates if an installed version is valid

func (*Golang) ValidateVersion

func (g *Golang) ValidateVersion(version string) bool

ValidateVersion validates if a version is valid

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL