go version)?$ go version go version go1.12.1 darwin/amd64
Yes
go env)?macOS / amd64 (this applies to all platforms) (and I don't like giving out my local user name)
go get https://github.com/cloudflare/mitmengine
Nothing, just having the dependency added.
An error:
package https:/github.com/cloudflare/mitmengine: https:/github.com/cloudflare/mitmengine: invalid import path: malformed import path "https:/github.com/cloudflare/mitmengine": invalid char ':'
I'm not sure what's the rationale behind this (it actually goes through the git protocol probably), but as an user I expect to be able to copy/paste from Chrome and have it work without removing the https:// everytime.
Thanks.
Please read go help packages - Go packages are defined by import paths, which do not include http nor https schemes.
Yes, I'm not saying this isn't how it's meant to be working right now, I'm saying this is how I expect it to work as a new user of Go.
Is there something in the go get documentation that made you think there should be an https:// prefix in front of the import path?
Anyway, I don't expect to change anyone's opinion, just pointing this out. Maybe you don't experience this, maybe you do. I think I'm far from the only person to expect https:// http:// git:// protocols to work when writing an url (even if in that case it represents an import path).
Also most people don't read the go help/man pages (which could be formatted better BTW), but google the issue they are having and/or follow a tutorial / classes. In my case I don't use go, just wanted to use a go-only library for a quick little project.
Thanks for providing additional information and context. It's helpful to finding out if there's something we can do to make an improvement.
I'm closing this as I don't think this is going to change and telling me to read the documentation is a bit disrespectful. To be honest that's exactly the reaction I expected.
I'm sorry that you feel that the replies here were disrespectful. I know that was not the intent.
Unfortunately it's not really possible to use a complex system like Go without reading any documentation. That is not a goal of ours.
Agree with OP this should work.
At a minimum go could suggest a corrected command
Complex systems often use dependencies, and sometimes those dependencies are poorly or improperly documented.
I ran across this issue when fighting the exact same problem (due to poor documentation in a guide I was following), so clearly there are at least two of us, and probably many more. The fact that the error drops a forward slash makes one immediately think there's a typo, or a broken redirect, or an escaping issue. My first step was to crawl through Go files in our repository trying to figure out where the missing slash was in the codebase, and it took me at least 10-15 minutes to figure out what ended up being a very simple mistake.
Providing a useful error (rather than one that ends up being unintentionally misleading, through no fault of the Go maintainers) would involve a minimum level of effort and would be appreciated by many folks in the future who will run across this same problem.
It may not be a goal of yours that folks use Go without reading the documentation, but the fact of the matter is that users _will_ do so, as mentioned in the case of the issue creator's tutorial. Usability can help or hinder adoption of a platform, so I think it's at least worth considering, though, like all of us, I'm sure you have many competing priorities. Thanks for hearing us out :)
Most helpful comment
At a minimum go could suggest a corrected command