Giter Club home page Giter Club logo

Comments (7)

sheikhusmanshakeel avatar sheikhusmanshakeel commented on May 19, 2024 6

This go module hell is real people!

from project-layout.

Clivern avatar Clivern commented on May 19, 2024 2

Switching from dep to go modules is pretty easy @rhugga

first activate go mod if not active

$ export GO111MODULE=on

to switch from dep to go mod

$ go mod -init
$ go build ./...
$ rm -rf vendor Gopkg.* # look ma no hands
$ go list -m all

so go build ./... will fetch your dependencies and add them to go.mod and go.sum.

a nice wiki https://github.com/golang/go/wiki/Modules#daily-workflow

i already have two apps under my profile but i guess there is a lot of apps started to switch to go mod since dep not maintained anymore

from project-layout.

williamh avatar williamh commented on May 19, 2024 2

I have wondered this as well. Where do go.mod and go.sum end up in a complex project?

from project-layout.

frederikhors avatar frederikhors commented on May 19, 2024

@williamh still no answers?

from project-layout.

vishal-yadav avatar vishal-yadav commented on May 19, 2024

@williamh typically go.mod and go.sum should be in the project root. kubernetes is one example.

from project-layout.

dsoprea avatar dsoprea commented on May 19, 2024

I also have to anchor it with a .MODULE_ROOT file in the project root and have a GetModuleRootPath() function in the root package that knows how to search and find the root project path in order to find assets required for the unit-tests. Need to set a variable for it in Travis CI config. Have been unable to find any other way (since all of the projects flatten into executables and there is only a limited concept of a tree at the end).

from project-layout.

thediveo avatar thediveo commented on May 19, 2024

The Kubernetes Go client is a good example of the go module versioning hell: so far, the Kubernetes go client module maps all stable versions vx.y.z since 1.17.z onto v0.y.z, such as v0.17.0. Until go module versioning starts working in the Kubernetes client, I personally consider this versioning concept to be unready for real-world consumption and only a non-proof of concept.

And that's probably the reason for the mass of rather useless trivial blog posts that just repeat one after another the same useless examples (there is a nice German proverb fitting perfectly the blogosphere: "albeit everything has been said, it hasn't yet been said by everybody").

from project-layout.

Related Issues (20)

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.