Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Start New Project with Modules #859

Closed
russoj88 opened this issue Aug 13, 2019 · 8 comments
Closed

Cannot Start New Project with Modules #859

russoj88 opened this issue Aug 13, 2019 · 8 comments

Comments

@russoj88
Copy link
Contributor

I'm trying to use this in a new project (using go modules), but am receiving the following error. I also tried updating an existing project, but it failed with a similar error. This is on PopOS 19.04 (Ubuntu 19.04), go 1.12.7.

main.go:

package main

import (
	"gopkg.in/urfave/cli.v1"
	"log"
	"os"
)

func main() {
	err := cli.NewApp().Run(os.Args)
	if err != nil {
		log.Fatal(err)
	}
}
# go get gopkg.in/urfave/cli.v1
go: gopkg.in/urfave/[email protected]: go.mod has non-....v1 module path "github.com/urfave/cli" at revision v1.21.0
go: error loading module requirements

This worked with cli 1.20.0.

@AudriusButkevicius
Copy link
Contributor

AudriusButkevicius commented Aug 13, 2019

You should use the github url, rather than gopkg.in. Whether that is right or not is debatable but it will address your issue.

@coilysiren
Copy link
Member

👍 for using the GitHub URL, I have no idea how the gopkg.in url works

@russoj88
Copy link
Contributor Author

russoj88 commented Aug 13, 2019

@AudriusButkevicius That does work, but like the documentation says, that'll cause issues when v2 becomes master.

This is the section I'm referring to: https://github.com/urfave/cli#pinning-to-the-v1-releases

@coilysiren
Copy link
Member

The readme is outdated, pinning github has nothing to do with v1 vs v2

@russoj88
Copy link
Contributor Author

Got it. Mind if I make an issue for outdated docs?

@AudriusButkevicius
Copy link
Contributor

A pr would be more welcome

@russoj88
Copy link
Contributor Author

I'd like to do a pr as well, but I think it'd just be me asking someone here what to put in. If that's ok, I can start that now.

@coilysiren
Copy link
Member

@russoj88 yeah totally! go for it 👍

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

No branches or pull requests

3 participants