Hacker News new | ask | show | jobs
by tyrankh 2952 days ago
Couple of quick notes from my phone, as a googler gopher:

- IIRC package management was historically left to the community to solve for, rather than the go maintainers mandating how package mgmt should be done. Many languages have followed this model. I've never heard of it having to do anything with our mono repo model. The community never ended up standardizing on a model; since then, the go team has endorsed godep as the official experimental package manager, whose learnings were used to design vgo. Vgo is very new, and still being iterated on; check it out though!

- vgo removes the need for GOPATH

- There is a one-line installer to set up your env. It's very useful and simplifies a lot of what this blog talks about.

Sorry I don't have links - on phone at airport! All the above should be easily googleable though! :)

2 comments

As the parent mentions, vgo is still very experimental. But if you'd like to try it out (or contribute!), I recommend the following links:

The official Go issue: https://github.com/golang/go/issues/24301

And Russ Cox's Tour of vgo: https://research.swtch.com/vgo-tour

Which is part of Russ Cox's vgo series: https://research.swtch.com/vgo

If I may ask, how do you handle the use of other languages within a project that uses Go? I am new to Go, so it might be a silly question.

I currently have a project that uses Node and React for the front-end and Go for streaming and scraping large .xml + .json data due to its great standard library.

With Node I can start a project wherever I would like — e.g. D:/work/node_project. Go seems to be much more opinionated on that? I opted to follow Go’s preferred directory structure and include npm related packages there, but feel I am not following best practices. Ideally, I would like to have one directory for my projects.

I will take a good look at vgo this afternoon. It removing the need for GOPATH sounds interesting. Thank you.

I make the go server/package the repo and add a web/ subdirectory for my static and dynamic JavaScript code, plus a little bit of Makefile glue.

Here is a boilerplate Go Lambda app with a Node Lambda function and a static Vue app:

https://github.com/nzoschke/gofaas