Go Quickstart

By pjain      Published July 29, 2019, 2:18 a.m. in blog Programming   

Quick Setup

  • install git, brew, vscode or atom
  • Install go from golang.org/dl.
  • Choose the latest version available for your OS eg go1.4.2.darwin-amd64-osx10.8.pkg) and run it and follow prompts
    • it typically installs go in /usr/local/go/
  • Create Workspace ~/Develop/go - default directory for home - contains the packages, environment, etc
    • I don't like the default ~/go location md ~/Develop/go
    • So you need to set GOPATH variable in your ~/.bash_profile to eg export GOPATH=/Users/xyz/Develop/go export PATH="/usr/local/go/bin:$PATH"

Build Go, Install or Remove from workstation

  • or build it then run it like an executable file $ cd ~/Develop/go/src/hello/ $ go build # creates a hello file -on OSX was for me - 2,120,520 bytes $ ./hello # outputs .. hello, world

  • To install a go command in workspace bin $ go install # to install the binary into your workspace's bin directory $ go clean -i #to remove it.

Go Try it on https://golang.org/


  • GREAT! https://play.golang.org/
  • https://repl.it/site/languages/go


$ go version
$ go help # lists commands
$ go run hello.go
$ godoc fmt Println

Get packages

go get golang.org/x/tour   # installs the tour go package binary in /go/bin

Go Examples Quickstart


  • Create following hello.go in your go workspace folder eg ~/Develop/go/src/hello/hello.go

    package main import {"fmt"} // this is a comment func main() { fmt.Println("Hello World") fmt.Println("1 + 1 =", 1 + 1) }

  • You can run it as a go file using go runtime $ go run hello.go # outputs .. hello, world


TODO Quickstart next

https://github.com/golang/go/wiki/Screencasts https://gobyexample.com/ https://golang.org/doc/effective_go.html http://go-book.appspot.com/


Quick start Resources


Writing Microservices in Go Part II - When Not to Use Go | Nordic APIs | Calling Go functions from LUA - Tit Petric Lua: Good, bad, and ugly parts - ZeroBrane go quickstart - Google Search Getting Started - The Go Programming Language Programming in Lua An Introduction to Programming in Go | Go Resources Arrays, Slices and Maps — An Introduction to Programming in Go | Go Resources go on mobile - Google Search golang/mobile: [mirror] Go on Mobile Mobile · golang/go Wiki iOS and Android Programming with Go — SitePoint gomobile - GoDoc gomobile reviews - Google Search shared object library in go - Google Search


Comment 1 by fila June 4, 2020, 6:56 p.m.

Thanks a lot for giving everyone remarkably remarkable possiblity to read critical reviews from this site. It can be so great and packed with a good time for me and my office co-workers to search your site really thrice every week to find out the fresh secrets you will have. And definitely, we're certainly astounded considering the very good thoughts you give. Some 1 areas in this post are clearly the most suitable we've had.
fila [url=http://www.filashoes.org]fila[/url]

Comment 2 by golden goose outlet June 6, 2020, 10:44 p.m.

Thank you a lot for providing individuals with remarkably breathtaking opportunity to read articles and blog posts from this site. It's always very awesome plus stuffed with amusement for me personally and my office friends to search your web site at a minimum three times in a week to learn the fresh items you have. Of course, I'm usually pleased concerning the powerful opinions you give. Certain 4 areas in this post are undeniably the best I've had.
golden goose outlet

Comment 3 by yeezy 500 blush June 9, 2020, 2:22 a.m.

My wife and i got quite peaceful that Emmanuel managed to complete his research because of the precious recommendations he acquired while using the site. It is now and again perplexing to simply always be handing out tactics that some others could have been trying to sell. Therefore we know we have the website owner to thank because of that. The type of explanations you have made, the easy site menu, the relationships your site help promote - it's got everything exceptional, and it is making our son and us feel that this article is cool, which is certainly wonderfully indispensable. Thank you for the whole lot!
yeezy 500 blush

Comment 4 by lebron shoes June 11, 2020, 9 p.m.

Thanks so much for providing individuals with remarkably nice chance to discover important secrets from this web site. It's always very pleasing and jam-packed with amusement for me personally and my office colleagues to search the blog at a minimum thrice a week to see the fresh stuff you have got. And indeed, I am always happy with all the fabulous guidelines you serve. Selected 4 tips on this page are honestly the best I've ever had.
lebron shoes

Comment 5 by supreme outlet June 16, 2020, 9:56 p.m.

I needed to write you a tiny remark to be able to give thanks over again considering the pretty views you have featured in this article. This has been simply particularly open-handed of you to offer without restraint what a lot of people might have distributed for an ebook in order to make some money for their own end, chiefly considering that you might well have tried it if you desired. Those concepts in addition worked as the good way to be aware that many people have a similar keenness similar to mine to find out lots more on the topic of this condition. I'm certain there are millions of more fun opportunities in the future for people who look into your site.
supreme outlet

Comment 6 by supreme June 24, 2020, 5:48 a.m.

Thanks so much for providing individuals with an extraordinarily pleasant chance to read in detail from here. It is often so good and full of a good time for me personally and my office peers to search the blog no less than three times in one week to read through the newest items you will have. Of course, I'm also certainly satisfied with the beautiful ideas you give. Certain 4 tips in this post are completely the most efficient we've ever had.

Comment 7 by christian louboutin outlet June 30, 2020, 12:22 p.m.

I am just writing to let you know of the beneficial encounter my girl obtained browsing your webblog. She mastered plenty of issues, which include what it is like to have an amazing coaching mood to have folks effortlessly comprehend some grueling things. You undoubtedly did more than our own expectations. Thanks for supplying the interesting, dependable, revealing and easy tips on that topic to Kate.
christian louboutin outlet

Comment 8 by moncler jackets July 5, 2020, 5:54 p.m.

I'm also commenting to let you understand what a great experience our girl found visiting the blog. She picked up several pieces, including what it is like to possess a wonderful giving nature to have the rest without hassle know just exactly specified problematic matters. You undoubtedly surpassed my expected results. Many thanks for showing the great, healthy, revealing as well as fun guidance on your topic to Ethel.
moncler jackets

Comment 9 by lebron 16 July 11, 2020, 6:01 a.m.

I not to mention my pals ended up checking out the great guides found on your website then suddenly I had an awful suspicion I had not expressed respect to the blog owner for those tips. Those young men had been for that reason thrilled to learn all of them and now have clearly been taking pleasure in them. Many thanks for turning out to be indeed accommodating and also for picking out variety of perfect things most people are really wanting to be aware of. Our own honest regret for not expressing gratitude to earlier.
lebron 16

Add new comment

Similar posts

Go Sample Full Apps

Go Reference, Cheatsheet

Go Setup Smarts

Go Concurrency 101