cmd

package
v0.0.0-...-a214d60 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ext = ""

Functions

func DownloadComplier

func DownloadComplier(cmd *cobra.Command, typ string) error

DownloadComplier 下载并源码构建指定版本的编译器

func Exec

func Exec(cmdroot *cobra.Command, commind ...string) error

Exec 执行命令

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func InitLink() error

InitLink 初始化链接目录

func IsVersion

func IsVersion(typ string) bool

IsVersion 判断 $U_HOME\sdk是否安装了指定版本编译器 假定传入的版本号正确

func Link(typ string) error

Link 将 $U_HOME\sdk\link 设置为指定编译器版本的目录符号链接

func MinorVersionNumberAndRevisedVersionNumber

func MinorVersionNumberAndRevisedVersionNumber(s string) (int, int, error)

MinorVersionNumberAndRevisedVersionNumber 获取次要版本号和补丁版本号

func RmComplier

func RmComplier(typ string) error

RmComplier 删除指定版本的编译器

func SetComplier

func SetComplier(typ string) error

func U_HOME_init

func U_HOME_init()

Types

type ComplierDirInfo

type ComplierDirInfo struct {
	// 路径
	Path string
	//编译器版本
	Version string
}

ComplierDirInfo 编译器目录信息

type SortComplierDirInfo

type SortComplierDirInfo []ComplierDirInfo

SortComplierDirInfo 为ComplierDirInfo切片实现 sort.Interface 接口

func GetComplierDirInfo

func GetComplierDirInfo(root string) SortComplierDirInfo

GetComplierDirInfo 从root获取所有的编译器目录信息

func (SortComplierDirInfo) Find

func (s SortComplierDirInfo) Find(version string) ComplierDirInfo

func (SortComplierDirInfo) Len

func (s SortComplierDirInfo) Len() int

func (SortComplierDirInfo) Less

func (s SortComplierDirInfo) Less(i, j int) bool

func (SortComplierDirInfo) Swap

func (s SortComplierDirInfo) Swap(i, j int)

Jump to

Keyboard shortcuts

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