@hello-wn
This commit is contained in:
Xingyu Wang 2019-09-01 22:37:36 +08:00
parent 6ff15831f0
commit 89a5b20ba1

View File

@ -1,6 +1,6 @@
[#]: collector: "lujun9972"
[#]: translator: "hello-wn"
[#]: reviewer: " "
[#]: reviewer: "wxy"
[#]: publisher: " "
[#]: url: " "
[#]: subject: "Getting Started with Go on Fedora"
@ -27,6 +27,7 @@ $ sudo dnf install -y golang
$ go version
go version go1.12.7 linux/amd64
```
既然装好了 Go ,让我们来写个简单的程序,编译并运行。
### 第一个 Go 程序
@ -50,7 +51,7 @@ $ go run main.go
Hello, World!
```
Go 会在临时目录将 `main.go` 编译成二进制文件并执行,然后删除临时目录。 这个命令非常适合在开发过程中快速运行程序,它还显了 Go 的编译速度。
Go 会在临时目录将 `main.go` 编译成二进制文件并执行,然后删除临时目录。这个命令非常适合在开发过程中快速运行程序,它还显了 Go 的编译速度。
编译一个可执行程序就像运行它一样简单。
@ -105,7 +106,7 @@ via: https://fedoramagazine.org/getting-started-with-go-on-fedora/
作者:[Clément Verna][a]
选题:[lujun9972][b]
译者:[hello-wn](https://github.com/hello-wn)
校对:[校对者ID](https://github.com/校对者ID)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出