Skip to content

Instantly share code, notes, and snippets.

@rhcarvalho
Last active June 17, 2016 16:08
Show Gist options
  • Save rhcarvalho/3e1f7eb5bfd425c868838f946e67940f to your computer and use it in GitHub Desktop.
Save rhcarvalho/3e1f7eb5bfd425c868838f946e67940f to your computer and use it in GitHub Desktop.
Automatic integration with Godep using Atom's Init Script
# Add the lines below to your init.coffee file to automatically update the
# GOPATH used by tools like those from the go-plus plugin.
fs = require("fs")
path = require("path")
for p in atom.project.getPaths()
workspace = path.join(p, "Godeps", "_workspace")
if fs.existsSync(workspace)
process.env.GOPATH = workspace + ":" + process.env.GOPATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment