utils

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: LGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsuppotedCompressFormat = fmt.Errorf("unsupported compress format")
	FvmHome                     = os.Getenv(consts.FVM_HOME)
)
View Source
var (
	Config      model.Config
	ErrNoConfig = errors.New("No config file")
)
View Source
var (
	ErrShellConfigFileNotFound = fmt.Errorf("shell config file not found")
)
View Source
var (
	ErrUnsupportedShellPrefix = "Unsupported shell: "
)
View Source
var (
	ErrVersionNotInstalled = errors.New("Version not installed. \nPlease install it before using.")
)

Functions

func ConfigGitIgnore

func ConfigGitIgnore() error

func ConfigIde

func ConfigIde() error

func ConfigPath

func ConfigPath() error

func Contains

func Contains[T string | int | int64 | float64](list []T, item T) bool

func Execute

func Execute(bin string, args ...string) error

func Exists

func Exists(path string) bool

func GetArch

func GetArch() string

func GetConfig

func GetConfig() error

func GetFileHash

func GetFileHash(path string) (string, error)

func GetOS

func GetOS() string

func GetReleaseByVersion

func GetReleaseByVersion(releases []model.Release, version string) (r model.Release, err error)

func GetReleases

func GetReleases() (releases []model.Release, err error)

func GetVersionDir

func GetVersionDir(v string) string

func Global

func Global(version string) error

func Install

func Install(r model.Release) error
func IsSymlink(name string) (bool, error)

func IsVersionInstalled

func IsVersionInstalled(version string) bool

func JudgeUseMirror added in v0.0.6

func JudgeUseMirror(notify bool) bool

func SaveConfig

func SaveConfig() error

func SetAlias added in v0.0.6

func SetAlias() error
func Symlink(src, dst string) error

func Test

func Test() error

func Uncompress

func Uncompress(src, dest string) error

func Use

func Use(v string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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