# Organizing Code to Support Go Get

DevFeed: [Organizing Code to Support Go Get](<https://devfeed.tech/articles/organizing-code-to-support-go-get-22065.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2013/08/organizing-code-to-support-go-get.html>)

Published: 2013-08-28T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Deployment](<https://devfeed.tech/topics/deployment.md>), [Development](<https://devfeed.tech/topics/development.md>), [Code](<https://devfeed.tech/topics/code.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [development](<https://devfeed.tech/tags/development.md>), [github](<https://devfeed.tech/tags/github.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [programming](<https://devfeed.tech/tags/programming.md>), [ubuntu-server](<https://devfeed.tech/tags/ubuntu-server.md>)

## AI overview

A practical guide to organizing Go repositories and code so the go get command can download dependencies, build packages, install applications, and update deployments across machines.

## Source excerpt

For those of you who are like me, trying to learn the Mac and Linux operating systems, Golang programming and deployment constructs all at the same time, I feel your pain. I have been building a Go application for a couple of months on my Mac and it was time to deploy the code on a local Ubuntu server. I was having a really tough time and it was turning into a disaster. Like always, I kept telling myself, I must be doing something wrong. Well, I was, big-time. Let me put it this way. After spending 2 days reorganizing repositories and code, I finally figured out how the Go tool works. Now I can update my development environment, deploy, build, install and update my Go applications on any machine with one simple call to go get. I am sure there are several ways you can organize code that will work with the Go tool. What I am going to present is working for me and I wish I knew all of this when I started. There are a 1000 ways to skin a cat and we all have our favorite way, this one is now mine. Everything we do in Go should be based on what the Go tool can do. Going off the reservation will get you in trouble, I am living proof. One special command we are going to focus on is get. The get command will download code, build and install packages and produce an executable binary if you are building a program. It is very smart and can read your code to find dependences that it will download, built and install as well. That is, if everything is structured and set correctly. This document explains all the things the Go tool can do: External resource on golang.org: http://golang.org/cmd/go/ But I want to concentrate on this section: External resource on golang.org: http://golang.org/cmd/go/#hdr-Remote_import_path_syntax Even as I read this document now I have a hard time understanding what it is trying to tell me. I use Github but you don't have to. The Go tool supports Github, Mercurial, Subversion and Bazaar out of the box. If you are not using any of these systems for vers