记录点:

godoc -http=localhost:6060go versiongo buildgo installgo get

HelloWorld 代码:

package main

import (
    "fmt"
    "os"
    "strings"
)

func main() {
    who := "World!"
    if len(os.Args) > 1 {
        who = strings.Join(os.Args[1:], " ")
    }
    fmt.Println("Hello", who)
}

HelloWorld 代码解读:

mainmainimport:=len()osArgs[n:]stringsfmtprintfscanf

Go 语言学习相关的站点: