Skip to content

Start

Updated View as Markdown

引言

我决定学习 GoLang.

Download: https://golang.google.cn/dl/

  • 添加环境变量

Hello World!

go mod init example/hello

粘贴代码:

package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

运行:

>go run .
Hello, World!

构建输出:

>go build -o [可执行文件]

至此,Hello World 完成。

参考:

Go 官方教程

Navigation

Type to search…

↑↓ navigate↵ selectEsc close