Skip to content
Snippets Groups Projects
Unverified Commit af817f9e authored by Matt Palmer's avatar Matt Palmer Committed by GitHub
Browse files

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
parent 5eea19b5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment