When not using fully qualified url package names (eg mod foobar instead of mod github.com/foo/bar), the code that strips the package from the path strips too much of it.
This change leaves the default behavior unchanged (stripping github.com/owner/repo) and adds ability to configure custom package name to make path stripping work correctly with custom module names.
When not using fully qualified url package names (eg
mod foobar
instead ofmod github.com/foo/bar
), the code that strips the package from the path strips too much of it.This change leaves the default behavior unchanged (stripping
github.com/owner/repo
) and adds ability to configure custom package name to make path stripping work correctly with custom module names.