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

using 'change.me' placeholder in go.mod causes network connections to hostname 'change.me' #330

Open
sneak opened this issue Nov 27, 2022 · 3 comments
Labels
needs decision Need to think more and decide

Comments

@sneak
Copy link

sneak commented Nov 27, 2022

When using example/placeholder strings that are interpreted as domain names, the domain example.com should be used.

module.Name = "change.me"

@sneak
Copy link
Author

sneak commented Nov 27, 2022

Potential workaround would be to interactively prompt the user for the package URI during create operation.

@matthewmueller
Copy link
Contributor

Hmm, wouldn't example.com also be interpreted as domain name?

There's some prior discussion about this in: #240. The TL;DR was that:

  • We originally prompted when outside of $GOPATH
  • People got confused why you'd need to provide that during scaffolding

Curious how you ran into this in the first place? Did you run go mod tidy and there was a missing package, so it looked for change.me/some/package and that was confusing?

We could also explore intentionally giving an invalid module name. Maybe that would behave in a more obvious manner.

@matthewmueller matthewmueller added the needs decision Need to think more and decide label Nov 28, 2022
@sneak
Copy link
Author

sneak commented Nov 28, 2022

Hmm, wouldn't example.com also be interpreted as domain name?

Yes, but example.com is always guaranteed to be an innocuous domain name (it's IANA reserved): https://example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs decision Need to think more and decide
Projects
None yet
Development

No branches or pull requests

2 participants