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 modules replace all `golang.org/x` to `github.com/golang` #29076

Closed
panjiang opened this Issue Dec 3, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@panjiang
Copy link

panjiang commented Dec 3, 2018

Too many version should be replace, even if there are in same repository

replace (
    golang.org/x/net v0.0.0-20180724234803-3673e40ba225 => github.com/golang/net v0.0.0-20180724234803-3673e40ba225
    golang.org/x/net v0.0.0-20180906233101-161cd47e91fd => github.com/golang/net v0.0.0-20180906233101-161cd47e91fd
    golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1 => github.com/golang/net v0.0.0-20181011144130-49bb7cea24b1
    ...
)

I need a wildcard shortcut

golang.org/x/net v0.0.0-* => github.com/golang/net v0.0.0-*

Or

golang.org/x/net * => github.com/golang/net *
@mvdan

This comment has been minimized.

Copy link
Member

mvdan commented Dec 3, 2018

Why do you need to replace so many dependencies?

Also, I believe you can do a replace foo.bar => foo.baz latest, which is close to your second suggestion.

@panjiang

This comment has been minimized.

Copy link

panjiang commented Dec 3, 2018

Thanks for your answer, It is my wanted.

replace (
	cloud.google.com/go => github.com/GoogleCloudPlatform/google-cloud-go latest
	golang.org/x/crypto => github.com/golang/crypto latest
	golang.org/x/net => github.com/golang/net latest
	golang.org/x/sync => github.com/golang/sync latest
	golang.org/x/sys => github.com/golang/sys latest
	golang.org/x/text => github.com/golang/text latest
	google.golang.org/appengine => github.com/golang/appengine latest
)

Sorry I have not found the detailed usage about replace.

@agnivade

This comment has been minimized.

Copy link
Member

agnivade commented Dec 3, 2018

We are tracking this here #28652. Please feel free to add your suggestions there.

What you are proposing is essentially golang.org/x/* => github.com/golang/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment