Go GOPATH Issues

The cluster focuses on frustrations with Go's GOPATH workspace model, including its rigid directory structure for multiple projects, workarounds like per-project GOPATHs and tools such as gpm or Glide, and the transition to Go modules that eliminate GOPATH requirements.

πŸ“‰ Falling 0.4x Programming Languages
2,134
Comments
18
Years Active
5
Top Authors
#6920
Topic ID

Activity Over Time

2009
2
2010
4
2011
10
2012
60
2013
158
2014
138
2015
167
2016
191
2017
267
2018
245
2019
147
2020
108
2021
133
2022
131
2023
128
2024
147
2025
90
2026
8

Keywords

e.g IMHO dzone.com main.go GIT GOPATH DD example.com package.json pkgdoc.org src package repo code build projects modules env source folder

Sample Comments

thefounder β€’ Nov 10, 2020 β€’ View on HN

But I have tools built with GOPATH assumptions...

frik β€’ Jul 14, 2017 β€’ View on HN

Multiple unrelated Go projects in different GIT/SVN repositories. GOPATH experience is painful.

alexandernst β€’ Feb 16, 2018 β€’ View on HN

Have they fixed already the GOPATH crap?

artursapek β€’ Sep 13, 2014 β€’ View on HN

You're welcome to clone the repo yourself and build it. Go doesn't have a centralized package manager like npm, just a tool that automates downloading and building a repo. Nobody is forcing you to use it; it's a convenience.

XorNot β€’ Sep 2, 2015 β€’ View on HN

The intellij go plugin is your friend. Per project go-paths. It's also a good use of make.

stock_toaster β€’ May 8, 2015 β€’ View on HN

Seems like the author is suggesting something very similar to what [gpm][1][2] provides. I use gpm for a few projects, along with a makefile that creates a GOPATH at $(pwd)/_build, and it works fairly well.[1]: http://java.dzone.com/articles/why-gpm-right-go-package[2]: https://gi

savaki β€’ Aug 4, 2020 β€’ View on HN

You may want to consider looking into go modules. It works much the same way that cargo does for rust and you won’t need to worry about GOPATH for most cases.

alexandernst β€’ Nov 2, 2018 β€’ View on HN

Is the GOPATH bullshit gone already?

stubish β€’ May 22, 2019 β€’ View on HN

Curious if this is tightly wedded to $GOPATH, which thankfully seems to be dying with Go modules.

egeozcan β€’ Feb 17, 2018 β€’ View on HN

IMHO, fixing it would be being able to build go code on random directories without env hackery.