fix(go): Mimic Go logic for `GOPRIVATE` parsing (#13166)
Ensure that the parsing of `GOPRIVATE`/`GONOPROXY` matches the behaviour of Go itself. The documentation for these values state it matches the logic of `path.Match`, however in reality it's actually a prefix based match. Updating the regex to allow for either an exact match, or a match where the configured value is a prefix of the package, when a `/` is added. Additionally, strip any trailing `/`'s from the configured value, as this matches the logic that Go takes when matching. Fixes #13138
Loading
Please register or sign in to comment