创建版本库


VS Code配置Go环境
官方文档: 为 Go 开发配置Visual Studio Code | Microsoft Learn
注意:
Vs Code设置Run In Terminal
Go的工具包下载建议配置代理地址
$ go env -w GO111MODULE=on
$ go env -w GOPROXY=https://goproxy.cn,direct

编写menu第一版简单程序
package main
import"fmt"funcmain() {
for {
var cmd string
fmt.Println("请输入命令:")
fmt.Scanln(&cmd)
if cmd == "help" {
fmt.Println("命令列表:")
fmt.Println("--quit")
fmt.Println("--hello")
} elseif cmd == "quit" {
break
} elseif cmd == "hello" {
fmt.Println("hello")
} else {
fmt.Println("没有找到命令,需要帮助请输入 \"help\"")
}
}
}

测试:


推送到远程仓库



