gobyexample/src/hello-world/hello-world.sh
Mark McGranaghan cdcf8eaaa5 consistency
2012-10-09 11:11:05 -07:00

18 lines
436 B
Bash

# To run the program, put the code in `hello-world.go` and
# use `go run`.
$ go run hello-world.go
Hello world
# Sometimes we'll want to build our programs into
# binaries. We can do this using `go build`.
$ go build hello-world.go
$ ls
hello-world hello-world.go
# We can then execute the built binaries directly.
$ ./hello-world
Hello world
# Now that we can run and build basic Go programs, let's
# learn more about the language.