571
社区成员
发帖
与我相关
我的任务
分享在官网下载Go语言


cmd中运行以下命令,设置代理,相当于更改镜像源
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct

在VsCode中安装Go插件

安装相关工具


package main
import "fmt"
func main() {
var cmd string
for {
fmt.Print("Please input a command: ")
fmt.Scanln(&cmd)
switch cmd {
case "help":
fmt.Println("This is help command.")
case "quit":
fmt.Println("Quit.")
return
default:
fmt.Println("Wrong command!")
}
}
}


查看

作者:学号后三位-335