Skip to content

warpfork/getting-started-in-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started In Go

  1. Install git
  2. Open a terminal
    • (Windows users: open mysis-git bash shell!)
  3. Run the following:
git clone https://github.com/heavenlyhash/getting-started-in-go.git
cd getting-started-in-go
./harpoon.sh

YOU HAVE BEEN HARPOONED!

Try running go version.

Building & Running the Hello World

We've included an example snippet that runs a tiny webserver!

To build it, run:

go build hello.go

To run it, just...

./hello

That "hello" file is a statically-linked fully self-contained webserver! You can bring it anywhere. There's no runtime; nothing else to install; just that file.

Here are some other interesting commands you can run:

go fmt <- formats all your go code in this directory.

go test <- runs your tests

go test -v <- runs your tests, and outputs progress and log statements

Resources

http://golang.org/pkg/ <- API documentation for the standard library

http://golang.org/cmd/go/ <- Documentation for the go command (go build, go test, go get, etc)

http://golang.org/ref/spec <- The full syntax specification (very readable)

About

Clone, run: you now have a go toolchain.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published