Lab1:VSCode配置Go语言开发环境,并编写menu第一版简单程序提交git

TwistZZ 2023-03-20 13:09:46

1,下载go语言并配置环境

 

 2,go插件

 

3,新建代码仓库并克隆到本地

 

 

 4,编写menu程序并运行

 


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("Bye.")
            return
        default:
            fmt.Println("Wrong command!")
        }
    }

5,提交代码到远程仓库完成

 

学号:485 

...全文
29 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

571

社区成员

发帖
与我相关
我的任务
社区描述
软件工程教学新范式,强化专项技能训练+基于项目的学习PBL。Git仓库:https://gitee.com/mengning997/se
软件工程 高校
社区管理员
  • 码农孟宁
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧