编写Linux下第一个Go程序(2024版)
warning:
这篇文章距离上次修改已过189天,其中的内容可能已经有所变动。
// 文件名: hello.go
package main
import "fmt"
func main() {
fmt.Println("Hello, 2024's Go World!")
}
确保您已经安装了Go环境,然后在终端中运行以下命令来编译和运行程序:
go build hello.go
./hello
这将输出:
Hello, 2024's Go World!
评论已关闭