GithubHelp home page GithubHelp logo

smaky / golang-tools-install-script Goto Github PK

View Code? Open in Web Editor NEW

This project forked from canha/golang-tools-install-script

0.0 0.0 0.0 72 KB

Simple Bash script to automate Go language tools single user installation or even removal.

License: Apache License 2.0

Shell 100.00%

golang-tools-install-script's Introduction

golang-tools-install-script Build Status

Bash script to automate installation and removal of single user Go language tools.

Feel free to change the variables on the beginning to match whatever version of Go you need.

Works for:

  • โœ… Ubuntu 16.04 and above
  • โœ… macOS Sierra and above

๐Ÿ”จ Requirements

  • wget or curl
  • Bash shell

โฉ Install

Download and run with wget or curl:

# Linux typically has wget installed
wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash

# macOS typically has curl installed
curl https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash

๐Ÿ“ฆ Version

Pass the --version option into the script including the version that you wish to install. This specify a different version without needing to change the variable in the script.

Example:
wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh \
| bash -s -- --version 1.13.2

# or...
curl https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh \
| bash -s -- --version 1.13.2

๐Ÿšซ Uninstall

Pass the --remove option into the script:

wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh \
| bash -s -- --remove

# or...
curl https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh \
| bash -s -- --remove

๐Ÿ“ Notes

By default the script will create .go and go folders on your home directory, add the needed variables and PATH expansion.

$HOME/.go is the directory where Go will be installed to.

$HOME/go is the default workspace directory.

Read more about the workspace.

In order to install Go into another location, set the environment variables $GOROOT and $GOPATH before (un)installing:

export GOROOT=/opt/go
export GOPATH=$HOME/projects/go

golang-tools-install-script's People

Contributors

canha avatar carlosas avatar dialex avatar elimisteve avatar imvexed avatar lfkeitel avatar majorthorn avatar nepomuceno avatar unixabg avatar vhaidamaka avatar zelazna 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.