Giter VIP home page Giter VIP logo

Comments (3)

HanYangZhao avatar HanYangZhao commented on July 19, 2024

I've recently have had the same problem. It comes down to a dependency failure : cannot find package "github.com/go-playground/validator/v10" in any of. It happens when you do ``dep ensure``` as well

This problem has been asked in here. It looks like some kind of issues between dep and go modules, which are incompatible I assume.

I have managed to install the program by ditching dep completely and switching to go modules. You can find a tutorial here. You would Go 1.11+.

TL;DR
This method works with Go 1.11, 1.12, and should work with every 1.X future release.

  • move your code outside of GOPATH
  • go mod init [module path]: this will import dependencies from Gopkg.lock.
  • go mod tidy: this will remove unnecessary imports, and add indirect ones.
  • rm -fr vendor/
  • go build: is everthing ok?
  • rm -f Gopkg.lock Gopkg.toml
  • git commit -m 'chore(dep): migrated from dep to Go 1.11 modules'

To install the program in the future, you would just do go build

I would do a pull request, but I'm not sure about your Go setup

from golemu.

iomz avatar iomz commented on July 19, 2024

Thanks a bunch for the workaround. I'll take a look.

from golemu.

iomz avatar iomz commented on July 19, 2024

@HanYangZhao Thanks! It's resolved now.

from golemu.

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.