https://github.com/zelenin/go-mod-proxy
Go modules proxy boilerplate
https://github.com/zelenin/go-mod-proxy
go modules proxy vgo
Last synced: 2 months ago
JSON representation
Go modules proxy boilerplate
- Host: GitHub
- URL: https://github.com/zelenin/go-mod-proxy
- Owner: zelenin
- Created: 2018-09-19T14:28:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-19T14:31:35.000Z (over 6 years ago)
- Last Synced: 2024-06-20T08:09:04.596Z (11 months ago)
- Topics: go, modules, proxy, vgo
- Language: Go
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-mod-proxy
[Go modules proxy](https://tip.golang.org/cmd/go/#hdr-Module_proxy_protocol) boilerplate
## Usage
```go
package mainimport (
"github.com/zelenin/go-mod-proxy"
"gomod/proxy"
"log"
"net/http"
)func main() {
// implementation of `gomodproxy.Provider` interface
provider := proxy.ProviderImplementation()
handler := gomodproxy.New(provider)
server := &http.Server{
Addr: ":8080",
Handler: handler,
}log.Fatal(server.ListenAndServe())
}
```Then run:
```bash
GOPROXY=http://go-mod-proxy.local:8080 go build ...
```## Notes
* WIP. Library API can be changed in the future
## Author
[Aleksandr Zelenin](https://github.com/zelenin/), e-mail: [[email protected]](mailto:[email protected])