Documentation ¶
Overview ¶
Package gosdk 提供查找本机 go sdk 路径的功能 会从环境变量 $PATH 和目录 ~/sdk/ 查找
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoDisableGoWork ¶ added in v0.0.3
func AutoDisableGoWork() error
func DefaultOrLatest ¶
func DefaultOrLatest() string
DefaultOrLatest 查找 $PATH 里的 "go" 二进制文件的路径 或者是最高版本的 go 若没有,也会返回 "go"
func LatestOrDefault ¶
func LatestOrDefault() string
LatestOrDefault 返回最新版本,或者是 $PATH 里的 go 版本, 若没有,也会返回 "go"
func MustAutoDisableGoWork ¶ added in v0.0.3
func MustAutoDisableGoWork()
func TryAutoDisableGoWork ¶ added in v0.0.3
func TryAutoDisableGoWork()
Types ¶
type SDK ¶
type SDK struct {
// contains filtered or unexported fields
}
SDK 查找当前机器的 Go SDK 情况
func (*SDK) DefaultOrLatest ¶
DefaultOrLatest 查找 $PATH 里的 go 或者是最高版本的 go 若没有,也会返回 "go"
func (*SDK) LatestOrDefault ¶
LatestOrDefault 返回最新版本,或者是 $PATH 里的 go 版本 若没有,也会返回 "go"
Click to show internal directories.
Click to hide internal directories.