1. Create a go file hello.go and
enter the following code
package main
import "fmt"
func main(){
fmt.Println("Hello")
}
2. Switch to the directory where the file is located and
run it directly with the go run command
go run hello.go
Or
compile first to generate a hello binary file, and then run through ./hello
go build hello.go
./hello