internal/website/docs/guides/migration/v5-to-v6.md
v6 is a small, mechanical upgrade. The bulk of it is the Go module path; the behavioral changes are two, both with a one-line fix.
go-micro.dev/v6Go puts the major version in the import path, so every import changes:
// before
import "go-micro.dev/v5"
import "go-micro.dev/v5/server"
// after
import "go-micro.dev/v6"
import "go-micro.dev/v6/server"
A repo-wide find/replace does it:
grep -rl 'go-micro.dev/v5' --include='*.go' . \
| xargs sed -i 's|go-micro.dev/v5|go-micro.dev/v6|g'
go mod tidy
Update the CLI too:
go install go-micro.dev/v6/cmd/micro@latest
In v5, TLS certificate verification was off by default (you opted in with
MICRO_TLS_SECURE=true). In v6 it is on by default — the safe choice now
that an agent, not just a human on a trusted network, can reach an endpoint.
MICRO_TLS_SECURE is gone — remove it; it's the default now.MICRO_TLS_INSECURE=true, or
call tls.InsecureConfig() directly.NewService is the service constructorThe service constructor is now symmetric with NewAgent and NewFlow:
service := micro.NewService("greeter", micro.Address(":8080"))
agent := micro.NewAgent("task-mgr", micro.AgentServices("task"))
flow := micro.NewFlow("onboard", micro.FlowTrigger("events.user.created"))
micro.New("greeter", ...) still works as a deprecated alias — no rush,
but prefer NewService.micro.NewService(micro.Name("greeter"), ...) is
removed; pass the name positionally: micro.NewService("greeter", ...).Generated services already use NewService — re-running micro new or
micro run --prompt emits the v6 form.
No other API changed. Agents, services, flows, the registry/broker/store
interfaces, MCP, A2A, and x402 all work as they did — just under
go-micro.dev/v6 and secure by default.