Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
Path string
Versions map[string]*ModuleVersion
}
type ModuleProxy ¶
ModuleProxy is a bare-bones Go module proxy for offline testing. It preloads all module data into memory for fast serving.
func Load ¶
func Load(rootDir string) (*ModuleProxy, error)
Load creates a new TestModuleProxy that serves modules from the given directory. The directory structure should be: rootDir/
example.com/
module1/
@v/
v1.0.0/
go.mod
main.go
...
v1.1.0/
go.mod
main.go
...
func (*ModuleProxy) ServeHTTP ¶
func (p *ModuleProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler
type ModuleVersion ¶
Click to show internal directories.
Click to hide internal directories.