Git Product home page Git Product logo

go-env's Introduction

go-env

A simple Shell script to activate or deactivate Go ENV variables, such as GOPATH

What this project is?

A non-nonsense way of pointing GOPATH to your current project's working directory so that go get doesn't try to pollute your user's default go directory at $HOME/go. It was inspired by the venerable venv Python package, but has less bells and no whistles.

The activate function is run automatically and it sets both GOPATH and adjusts the PS1 prompt variable so that you know your Shell environment has been altered. deactivate resets all changed ENV variables to their previous values and executes the clean-up procedure, using unset.

What this project is not?

Something more elaborate like goenv by Anton Antonov or goenv by Chris Smith. Why? Because these projects have a much broader scope, but are slightly more challenging to set up.

Requirements

  • A system installation of Go binaries (any version) accessible to the user via correct PATH settings

Usage

  1. Place the .goenv.sh file in your project's working/root directory.
  2. Source the file running source .goenv.sh or . .goenv.sh, depending on your Shell and personal preferences.
  3. Enjoy an uninterrupted Go experience ;).
  4. When you're done, but don't want to terminate the currently running Shell session, call the deactivate function.

go-env's People

Contributors

andymender avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.