一、搭建本地开发环境
安装包下载地址为:https://golang.org/dl/。
如果打不开可以使用这个地址:https://golang.google.cn/dl/。
二、helloworld
1、打开编辑器,加入以下代码
import "fmt" func main() { fmt.Println("Hello, World!") }
2、保存为,hello.go
3、执行指令,go run hello.go
结果如下
一、搭建本地开发环境
安装包下载地址为:https://golang.org/dl/。
如果打不开可以使用这个地址:https://golang.google.cn/dl/。
二、helloworld
1、打开编辑器,加入以下代码
import "fmt" func main() { fmt.Println("Hello, World!") }
2、保存为,hello.go
3、执行指令,go run hello.go
结果如下