Go! new Hello World, 我的第一个Go程序

时间:2022-05-22 20:32:36

以下语句摘自百度百科:

Go语言是谷歌2009发布的第二款开源编程语言
Go语言专门针对多处理器系统应用程序编程进行了优化,使用Go编译的程序可以媲美C或C++代码的速度,而且更加安全、支持并行进程。
 
怀着强烈的好奇心,我在Windows上尝试了自己的第一个Go程序。
 
首先,到下面的地址下载Go语言开发环境:
http://code.google.com/p/go/downloads/list
 
下图列出了Windows版本的Go语言开发环境:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABGkAAAB2CAIAAAD0uVmhAAAgAElEQVR4nO2dX28bx/X353XNC5rXkcuotqJJ5NpFYgeK0KL1RW/n5hdHjZtYssMQCFAWaVdsXVog2lAmTauo8Fztc0Hu/D0zZ0ktZVH6fkAI1O7smT87mpnvnjMrUYf83//9Xw0AAAAAAAAAIEREv0M7AQAAAAAAAEAKtBMAAAAAAAAA8BDaqQcAAAAAAAAAIAR+JwAAAAAAAADggXYCAAAAAAAAAB5oJwAAAAAAAADggXYCAAAAAAAAAB5eOx0ePr3657qqAwAAAAAAAAAbgdFOh4dP+/3+/65Gv9+HfAIAAAAAAABsNbx2+m8XQDsBAAAAAAAAthpeO11QzN/PLy4uXv7j1f6Pj+4d7X3y4rMnJ19dXFy8f/+eTN+xdqrGUgxN9lRPiJ4QPUWn4Cx0cMlUiYGuVrLeGjMUywp6Wbha+/learlsCqkvu8l9jXa7O1Raikynq7QUS4rdkrZgVHiZUUII6d3pZYJCAQiTclNdtK4rLUvWXWv4qeijDqNEep5pWKpFyFaqtCRbbmk/Orcoij3oFSI+TGXU9h61xtrchHEAwN2k1ei3hsG1rwdbCDlxkwd9yssBtmeGc3Ipo3XhtdOcYvZuNp/Pj09PrHZ6fHwwn8/fvXtHpu9UO02V6Al6BT9VVjKZocgKmIKFrkq4Ge1UjaW1bIZNFVytKz2w9TKqJ+S4iq4Cm6Iwo3jax6j833DWQqVlNOwopbyE0fmWpd2cdjKqNDO61qi0JBqGrI1/0BlgG7Yo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AAAAHignQAAAAAAAACAB9oJAAAAAAAAAHignQAAAAAAAACAh9BOPQAAAAAAAAAAIYR2msz+Hz744IMPPvjggw8++OCDDz7+B9oJH3zwwQcffPDBBx988MGH//x/klG8jwOrYOgAAAAASUVORK5CYII=" alt="" />
 
从中选取适合你系统的一个msi或者zip,下载完成后直接安装即可,默认是安装在目录C:\Go下面,msi的安装程序可以帮你处理后面的环境变量设置,如果没有设置也很简单,将如下2个设置加入环境变量即可:
GOROOT=C:\Go
PATH=C:\Go\bin 到此为止,环境设置完成,超级简单吧。 接着进入激动人心的Hello World编程时刻: 创建一个文件,命名为test.go,或者其他的名字a.go b.go等,然后用文本编辑器打开,输入下面的代码:
package main

import "fmt"

func main() {
fmt.Printf("Hello World from Go.\n")
}

保存,然后从命令行进入存放.go文件的目录,输入下面的命令:

go run test.go

如果你看到类似下面的输出,ok,大功告成:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAARAAAAApCAIAAAByauGTAAACfklEQVR4nO2YUZLEIAhE5/6nytH211JoEMlMsvXeVwa1aREzVfl8AAAAAAAAXsRlcaJTW1jI+DWe7xC+ytQQYXN4ExovTEuDNnb52+9Ml/lXF6EN0Q3m/4Y3v6urnqZzh9o3eWY9X8xYCPNumP8AIrj+ZYmLJyaf6IQ+V6tCx1Qr6+TNeM8F/XWJpxNObtlaUuSJ7BZiXGXqmKP5YGhjrX5eP7NWGBAdsKUjNO/T94JJ/WS6sv5rmPZQW7jqTM9jNwgRMyJ0Mgewe3h363j7Gpe063tJp3oK2WS6vOctwQchfK/VFGvN57BAazCcVjiA0M+uz8aGuGO/W/rJVcl02mfB/+NYW2EaSlbWrEVYIHEwu0XXVifZaWtaRzjf0tHGvGCX/mE9TZ1xyAse+n8Wl8WJyBiZRr34mlcfgNAJfa6CYhfmNG/7oY5Ya04297tuPEzxSTR0wVImbvrcqg/8mFrD3afzX6E+/4euNxxvSg31AQAAAAAAAIAXUfj8V/h+X/OTt7Tlcxrdkqo5KcOHpsdR/l6uG7HFz7maVth6QbSY2aJ8NHAjXJgThftorwP0IC7MNaAX6rjW0ctXe55Jz5L2U74wIq/2mcwr5myZh2a8g/Sep4WeoPlzq1GmXhQ605zLuh6HfrTyOBrWcJ0m8up4xj80ow/Y65XP8y6M14iHfsQ0M6+u57qvTFJvg0n/0El4wJmFIn7SoElvWrbRTyYeel63tmWbC/NjMk0ZdoaInzRo0o+WbfSTiYee161l8oY1GSOZTUGRsBHFqUyjmfiWpYwfIR76WVN4ZnQRMkv0z0z21b9IHSoDAAAAAAAAAAAAAAAAAAAAAAAAQI0/auH3eQtYZ4UAAAAASUVORK5CYII=" alt="" />

Go语言有好多有趣的特征,慢慢探索吧!

Enjoy Go!

Go 语言官方网站: http://golang.org/