Skip to content

Cannot Start New Project with Modules #859

Closed

Description

@russoj88

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.

Activity

  1. AudriusButkevicius commented on Aug 13, 2019

    @AudriusButkevicius
    Contributor

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

  2. coilysiren commented on Aug 13, 2019

    @coilysiren
    Member

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

  3. russoj88 commented on Aug 13, 2019

    @russoj88
    ContributorAuthor

    @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

  4. coilysiren commented on Aug 13, 2019

    @coilysiren
    Member

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

  5. russoj88 commented on Aug 13, 2019

    @russoj88
    ContributorAuthor

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

  6. AudriusButkevicius commented on Aug 13, 2019

    @AudriusButkevicius
    Contributor

    A pr would be more welcome

  7. russoj88 commented on Aug 13, 2019

    @russoj88
    ContributorAuthor

    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.

  8. coilysiren commented on Aug 14, 2019

    @coilysiren
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions