
golang
treestory
这个作者很懒,什么都没留下…
展开
-
golang字符串[]string(slice)去重
1、现实代码// []string 去重func RemoveDuplicate(list []string) []string { // 这个排序很关键 sort.Strings(list) i := 0 var newlist = []string{""} for j := 0; j < len(list); j++ { if strings.Compare(newlist[i], list[j]) == -1 { newlist = append(newlist, lis原创 2020-06-26 16:57:56 · 2457 阅读 · 0 评论 -
在mac下设置go env -w GO111MODULE=off报错does not override conflicting OS environment varia
开头先写解决办法把 go env -w GO111MODULE=off 换成 export GO111MODULE=onexport GO111MODULE=off1.安装bee工具的时候报错执行安装 go getgo get -u github.com/astaxie/beegogo get -u github.com/beego/bee错误信息go: github.com/beego/bee imports github.com/beego/bee/cmd imports git原创 2020-06-15 06:57:04 · 15082 阅读 · 5 评论