3 ms·
Kind of ironic for a language that was the first that I know about where you can straight up import libraries with a URL directly in your source.
by xxpor 5y ago
Kind of ironic for a language that was the first that I know about where you can straight up import libraries with a URL directly in your source.
- deleted 5y ago[deleted]
- throwaway894345 5y agoIt's not a URL, it's just an identifier that sort-of resembles a URL similar to Kubernetes annotation conventions.
- benhoyt 5y agoIt may not be quite a URL, but it contains the URL. It definitely more than just "sort-of resembles a URL". See how the module path to URL lookup is done here: https://go.dev/ref/mod#vcs-find https://go.dev/ref/mod#vcs-find
- throwaway894345 5y agoI understand your meaning, but that link supports my claims. The package path helps the Go tool infer the actual URL, but it doesn't contain the URL itself (e.g., the actual URL has a scheme/protocol component and potentially a `go-get=1` query string argument which don't exist as part of the path). This is what I meant when I said it "sort-of resembles a URL", but I understand from this conversation how that wording wasn't clear.
- benhoyt 5y agoFair. Strictly speaking it doesn't even "contain" a URL. But I think in the context of this conversation it acts like a URL -- it allows the Go tooling to fetch code from an arbitrary domain and path on the internet.