Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

Latest commit

 

History

History
45 lines (36 loc) · 1.59 KB

godep.md

File metadata and controls

45 lines (36 loc) · 1.59 KB
title layout
Godep detour
detour

Godeps detour

When developing the tutorial or experimenting with different software versions the easiest way is to temporarily set your GOPATH to TUTROOT/external and use go get to download software into that "staging area":

{% highlight bash %} $ cd $ export GOPATH=$TUTROOT/external $ go get github.com/tools/godep $ go get github.com/gopherjs/gopherjs $ #etc for whatever software you want to install into the staging area $ ls TUTROOT/external/src/github.com {% endhighlight %}

Once you have the set of software installed in there that you want to experiment with, typically including a version of godep itself, you can do this:

{% highlight bash %} $ cd $ cd TUTROOT/src/tutorial $ rm -rf Godeps $ PATH=$PATH:TUTROOT/external/bin godep save ./... {% endhighlight %}

This procedure copies the code installed in TUTROOT/external/src directory into the Godeps folder. At this point, you can source enable-tutorial and your environment will return to normal but with your new/different vendored dependencies.

Complicating this is that the there three tools that have to be "by hand" added to the project to create a working tutorial. These are the packages "github.com/gopherjs/gopherjs", its subpackage jquery, "github.com/tools/godep".
There are some helpful lines, usually commented out, at the top of fresno/main.go that can help you force godep save to put these packages into the Godeps directory. You can't actually compile the project with these lines uncommented but it is enough to fool godep save.

Return To Main Tutorial