DEV Community

Yusuke Hatanaka
Yusuke Hatanaka

Posted on • Originally published at Medium on

3

Preparing the development environment for Go in late 2017

Introduction

  • gvm
  • direnv
  • Go
  • GoLand

gvm

moovweb/gvm

gvm is most popular Go Version Manager as far as I know.
It’s able to switch version of Go in easily.

Install:

% bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
% vi ~/.zshenv
[[-s ~/.gvm/scripts/gvm]] && . ~/.gvm/scripts/gvm
Enter fullscreen mode Exit fullscreen mode

direnv

direnv/direnv

direnv has good compatibility with Go, that can switch GOPATH without care.

Install:

% brew install direnv
% vi ~/.zshenv
[[-f /usr/local/bin/direnv]] && \
  eval “$(direnv hook zsh)”
% vi ~/.direnvrc
use_go(){
 . $GVM_ROOT/scripts/gvm-default
 gvm use $1
}
Enter fullscreen mode Exit fullscreen mode

Go1.9.2

Installing latest Go as binary.

% gvm install go1.9.2 -B
Enter fullscreen mode Exit fullscreen mode

GoLand

GoLand: Capable and Ergonomic Go IDE by JetBrains

GoLand is IDE developed by JetBrains.
It’ll be able to use without tedious settings. (I like also vim-go, but I use this recently, It’s easy)

Getting Started

% mkdir awesome-project
% cd awesome-project
% direnv edit
use go go1.9.2
layout go
Enter fullscreen mode Exit fullscreen mode

Ready to be done!

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay