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

go mod tidy: "./testutil" is relative, but relative import paths are not supported in module mode #14

Open
ianlewis opened this issue Nov 3, 2023 · 2 comments · May be fixed by #15
Open

Comments

@ianlewis
Copy link

ianlewis commented Nov 3, 2023

$ go mod tidy
go: finding module for package github.com/smartystreets/goconvey/convey
go: finding module for package gopkg.in/check.v1
go: found gopkg.in/check.v1 in gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
go: found github.com/smartystreets/goconvey/convey in github.com/smartystreets/goconvey v1.8.1
go: downloading golang.org/x/text v0.8.0
github.com/ianlewis/linguist/cmd/l imports
        github.com/dayvonjersen/git4go tested by
        github.com/dayvonjersen/git4go.test imports
        ./testutil: "./testutil" is relative, but relative import paths are not supported in module mode
@ianlewis
Copy link
Author

ianlewis commented Nov 3, 2023

Probably migrating to a more supported library like https://github.com/go-git/go-git would be better.

@ianlewis
Copy link
Author

ianlewis commented Nov 3, 2023

Probably migrating to a more supported library like https://github.com/go-git/go-git would be better.

Though I'm a bit curious why the l command doesn't just walk the regular directory tree and ignore files that match .git, .gitignore etc. rather than use a git library to parse the committed code.

Edit: I see it has options for both..

ianlewis added a commit to ianlewis/linguist that referenced this issue Nov 5, 2023
Ports the `l` command to use go-git rather than git4go as go-git is
better supported and supports Go modules.

Fixes dayvonjersen#14

Signed-off-by: Ian Lewis <[email protected]>
@ianlewis ianlewis linked a pull request Nov 5, 2023 that will close this issue
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 a pull request may close this issue.

1 participant