Skip to content

Go proxy demo project

A minimal Gobeta module that resolves a public dependency through the Craftifact demo instance.

Quick path

  1. Export your token as CRAFTIFACT_TOKEN.
  2. Point GOPROXY to the demo instance:
GOPROXY
https://__token__:${CRAFTIFACT_TOKEN}@demo.craftifact.com/repository/go/go-proxy,direct
  1. Change into static/examples/go-proxy-demo/.
  2. Run go test ./... and go run ..

What is in the example

The example is intentionally small:

  • go.mod declares one dependency, github.com/BurntSushi/toml.
  • main.go decodes a tiny TOML config and prints one line.
  • main_test.go proves the code path with go test.

Files

Why this works for a demo

The module path stays simple, but the dependency fetch still goes through the Craftifact demo instance. That keeps the setup realistic without making the example project itself complicated.

If you want a more production-like setup later, the same pattern also works with a private module path and a robot token.