Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodePath ¶ added in v0.1.0
DecodePath returns the module path of the given safe encoding. It fails if the encoding is invalid or encodes an invalid path.
func GetVersion ¶ added in v0.1.0
GetVersion gets the version from the path of a ?go-get=1 request.
func MatchesPattern ¶ added in v0.7.0
MatchesPattern reports whether the path prefix of target matches pattern (as defined by path.Match).
This tries to keep the same behavior as GOPRIVATE/GONOPROXY/GONOSUMDB, and is adopted from: https://github.com/golang/go/blob/a11644a26557ea436d456f005f39f4e01902bafe/src/cmd/go/internal/str/path.go#L58
Types ¶
type AllPathParams ¶
AllPathParams holds the module and version in the path of a ?go-get=1 request.
func GetAllParams ¶
func GetAllParams(r *http.Request) (*AllPathParams, error)
GetAllParams fetches the path params from r and returns them.
Click to show internal directories.
Click to hide internal directories.