Skip to main content

Getting Started with Go

Steve Francia (MongoDB)
Emerging Languages
Portland 256
Tutorial Please note: to attend, your registration must include Tutorials.
Average rating: ***..
(3.84, 19 ratings)
Slides:   1-PDF 

THIS TUTORIAL HAS REQUIREMENTS AND INSTRUCTIONS LISTED BELOW

This tutorial will give developers an introduction and practical experience in building applications with the go language. Go expert Steve Francia starts by explaining how to set up Go. Then he provides an overview of the fantastic go tools available. With our environment ready we will learn by doing. The remainder of the time will be dedicated to building a working go web and cli application. Through our application development experience we will introduce key features, libraries and best practices of using go. This tutorial is designed with web developers in mind. Prior experience with any of the following languages: ruby, perl, java, c#, javascript, php, node.js, or python is preferred. We will be using the MongoDB database as a backend for our application.

We will be using/learning a variety of libraries including:

  • bytes and strings
  • templates
  • net/http
  • io, fmt, errors
  • cobra
  • mgo

TUTORIAL REQUIREMENTS AND INSTRUCTIONS FOR ATTENDEES

* Prior experience with any of the following languages: Ruby, Perl, Java, C#, Javascript, PHP, Node.js, or Python is preferred.
* Participants will need:
* The latest version of MongoDB.
*
The latest version of Golang.
** Their own laptop.

QUESTIONS for the speaker?: Use the “Leave a Comment or Question” section at the bottom to address them.

Photo of Steve Francia

Steve Francia

MongoDB

Steve Francia is the creator of hugo, cobra, nitro & spf13-vim. An author of multiple O’Reilly books, Steve blogs at spf13.com and gives many talks and workshops around the world. He is the Chief Developer Advocate at MongoDB responsible for the developer experience of MongoDB and leads the software engineering team responsible for drivers and integrations with all languages, libraries and frameworks. He loves open source and is thrilled to be able to work on it full time. When not coding he enjoys skateboarding and having fun outdoors with his wife and four children.

Leave a Comment or Question

Help us make this conference the best it can be for you. Have questions you'd like this speaker to address? Suggestions for issues that deserve extra attention? Feedback that you'd like to share with the speaker and other attendees?

Join the conversation here (requires login)

Comments

Picture of Steve Francia
07/20/2014 1:23am PDT

Some last minute notes. We will be using git and mercurial to install the various dependencies our application will be using.

Please make sure that you have git and mercurial (hg) installed.

Git can be installed from http://git-scm.com/downloads

Mercurial can be installed from http://mercurial.selenic.com/wiki/Download

Feel free to use your package manager instead.

If you would like to download the dependencies prior to our workshop the following command will do it for you.

go get -u github.com/spf13/firstGoApp-Planet

This is also a good way to make sure that git and mercurial are installed and working properly.

It will silently install the following packages

  • github.com/GeertJohan/go.rice
  • bitbucket.org/kardianos/osext
  • github.com/GeertJohan/go.rice/embedded
  • github.com/gin-gonic/gin/render
  • github.com/spf13/cobra
  • github.com/kr/pretty
  • github.com/mitchellh/mapstructure
  • github.com/gin-gonic/gin
  • github.com/gin-gonic/gin/binding
  • github.com/jteeuwen/go-pkg-xmlx
  • github.com/spf13/pflag
  • github.com/BurntSushi/toml
  • gopkg.in/mgo.v2
  • github.com/julienschmidt/httprouter
  • github.com/jteeuwen/go-pkg-rss
  • gopkg.in/yaml.v1
  • gopkg.in/mgo.v2/bson
  • github.com/spf13/firstGoApp-Planet/commands
  • github.com/daaku/go.zipexe
  • github.com/spf13/viper
  • github.com/kr/text
  • github.com/spf13/cast
  • github.com/spf13/jwalterweatherman
Picture of Steve Francia
07/20/2014 12:47am PDT

If your machine supports the 64bit version you should install that one (virtually all machines today do). I don’t believe that anything we are doing requires 64bit, but I’ve not tried it on the 32bit.

07/19/2014 5:31pm PDT

Should we get the 32bit or 64bit version of Golang? Does it matter?