![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Go
路和远方
这个作者很懒,什么都没留下…
展开
-
命名规范
命名规范 以字母,数字,下划线组成 不能以数字开头 不能是关键字 break break 用于跳出循环 default 用于选择结构的默认选项(switch、select) func 函数定义 interface 定义接口 select go语言特有的channel选择结构 case 选择结构标签 chan 定义channel const 常量 continue 跳过本次循环 defer 延迟执...原创 2019-10-16 18:06:52 · 91 阅读 · 0 评论 -
go之hello world
hello world // go 语言以包作为管理单位 // 每个文件必须先声明包 // 程序必须有一个main包(重要) package main import ( "fmt" ) // 入口函数 func main() { // 注释方式一 /* 注释方式二 */ fmt.Println("hello world") // 代码结束没有 ; } 命令行编译和运行程序 go...原创 2019-10-16 18:05:47 · 105 阅读 · 0 评论 -
Go环境安装及GoIde安装
Go环境安装及GoIde安装 Go环境安装 根据环境下载安装包 https://golang.google.cn/dl/ 按照提示进行安装即可 GoIde安装(windows 为例) 下载压缩包 https://github.com/visualfc/liteide/releases 解压压缩包,并打开 liteide.exe Hello world 1.配置 GoPath 工具 &g...原创 2019-10-16 17:30:15 · 240 阅读 · 0 评论