Skip to content

Go Configuration

go:
  enabled: true
  repository:
    - name: go
      registry: https://proxy.golang.org
      sumdb-registry: https://sum.golang.org
      scan-manifest: true
      scan-package: true
      work-mode: strict_wait
      url-encoded-config: true

Configure the Go toolchain. Use go env -w for persistent configuration:

go env -w GOPROXY=https://osa-proxy.example.com/go
go env -w GOSUMDB="sum.golang.org https://osa-proxy.example.com/go/sumdb/sum.golang.org"
go mod download

GOSUMDB is required when requests to sum.golang.org must also go through OSA Proxy Go.

For a one-off run, set environment variables:

GOPROXY=https://osa-proxy.example.com/go \
GOSUMDB="sum.golang.org https://osa-proxy.example.com/go/sumdb/sum.golang.org" \
go get github.com/gin-gonic/gin@latest
Страница была полезна?