Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

gotool

by ohmystack (jiangjun1990@gmail.com)

gotool is a command-line tool for Golang to help the developer to source the workspace, and unsource it.

It is greatly inspired by the virtualenv from Python.

But here is only a small script. Cool, right?

recording

Feature

  • Activate/deactivate the current path as a $GOPATH
  • Add the relevant 'bin' directory into $PATH
  • Auto detect Godeps path
  • Colorful $PS1 support for zsh

We will have more feature in the future. Please tell me if you have a good idea.

Installation

$ cp gotool /usr/local/bin/gotool

Usage

$ gotool -h
Golang Developer Tool
Usage: source gotool [a|activate] [d|deactivate|exit]

Activate

Activate current path, adding it into $GOPATH and its ./bin into $PATH.

cd <your-workspace>
source gotool activate

# OR use 'a' for short
source gotool a

Done!

You will see a prefix, the name of this directory, in front of your PS1. If the path is under Godeps/_workspace/, the prefix will be the project name.

Then, you can check your $GOPATH and $PATH.

Deactivate

source gotool deactivate

# OR use 'd' for short
source gotool d

# OR
source gotool exit

About

Command-line tool for Golang developer

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.