1.hello go
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello Go")
}
2.运行
$ go run hello.go
Hello Go
3.编译可复用的go程序
$ go build hello.go
$ ./hello
Hello Go
1.hello go
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello Go")
}
2.运行
$ go run hello.go
Hello Go
3.编译可复用的go程序
$ go build hello.go
$ ./hello
Hello Go