Skip to content

Conversation

knoxfighter
Copy link
Member

@knoxfighter knoxfighter commented Oct 30, 2019

I've changed our package management to the modern go modules. These go modules are included in every go installation, so no additional software is necessary.
To build the go code, it has to be OUTSIDE of the GOPATH or run with GO111MODULE=on. Also the Code can only build with go 1.11 onwards. I recommend using go 1.13.
Additionally i changed the Makefile to work with go modules. I also cleaned up the Makefile, it had a lot of deprecated things in it.

Useful go modules commands:

  • go list -u -m -json all | go-mod-outdated -update -direct to get a list of outdated dependencies. If not installed: https://github.com/psampaz/go-mod-outdated
  • go get -u ./... Update all dependencies or edit the go.mod file manually
  • go mod tidy cleanup go.mod and remove all no-longer-needed dependencies
  • go get will install a dependency like normal
    https://github.com/golang/go/wiki/Modules

This PR has to be updated, when #158 is merged, or vice versa :)

@knoxfighter
Copy link
Member Author

After thinking a bit, this would fix the problems in #158. So i would merge this before the other one :)

@BarronKane
Copy link

I just started to go down this path, good think I checked the PRs. I've been wrestling with the vendor paths for awhile without luck.

@mroote
Copy link
Member

mroote commented Jan 7, 2020

This is great! Apologies for the late response.

I started converting to the new modules in my branch but got stuck on the vendor paths for the lockfile dep. Nice job getting it working thanks!

@mroote mroote merged commit cd1ec3b into OpenFactorioServerManager:develop Jan 7, 2020
@knoxfighter knoxfighter deleted the Feature/go-deps branch January 28, 2020 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants