{"record":{"id":"63259c3eec852c00","repo":"micro/go-micro","slug":"transport-q-is-not-linked-into-this-binary-impor","errorCode":null,"errorMessage":"transport %q is not linked into this binary: import go-micro.dev/v6/cmd/defaults to enable flag-selected plugins","messagePattern":"transport %q is not linked into this binary: import go-micro\\.dev/v6/cmd/defaults to enable flag-selected plugins","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cmd.go","lineNumber":536,"sourceCode":"\n\t// Set the selector\n\tif name := ctx.String(\"selector\"); len(name) > 0 && (*c.opts.Selector).String() != name {\n\t\ts, ok := c.opts.Selectors[name]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"Selector %s not found\", name)\n\t\t}\n\n\t\t*c.opts.Selector = s(selector.Registry(*c.opts.Registry))\n\n\t\t// No server option here. Should there be?\n\t\tclientOpts = append(clientOpts, client.Selector(*c.opts.Selector))\n\t}\n\n\t// Set the transport\n\tif name := ctx.String(\"transport\"); len(name) > 0 && (*c.opts.Transport).String() != name {\n\t\tt, ok := c.opts.Transports[name]\n\t\tif !ok {\n\t\t\treturn fmt.Errorf(\"transport %q is not linked into this binary: import go-micro.dev/v6/cmd/defaults to enable flag-selected plugins\", name)\n\t\t}\n\n\t\tsopts, clopts := c.setTransport(t())\n\t\tserverOpts = append(serverOpts, sopts...)\n\t\tclientOpts = append(clientOpts, clopts...)\n\n\t}\n\n\t// Parse the server options\n\tmetadata := make(map[string]string)\n\tfor _, d := range ctx.StringSlice(\"server_metadata\") {\n\t\tvar key, val string\n\t\tparts := strings.Split(d, \"=\")\n\t\tkey = parts[0]\n\t\tif len(parts) > 1 {\n\t\t\tval = strings.Join(parts[1:], \"=\")\n\t\t}\n\t\tmetadata[key] = val","sourceCodeStart":518,"sourceCodeEnd":554,"githubUrl":"https://github.com/micro/go-micro/blob/24529f140421a11a33b6999ab7944f2021cfd69c/cmd/cmd.go#L518-L554","documentation":"The --transport flag is matched against c.opts.Transports, filled by transport plugins via init(). A name absent from that map means the transport is not compiled into this binary; the CLI aborts with a message pointing to go-micro.dev/v6/cmd/defaults.","triggerScenarios":"Passing --transport quic/http (etc.) to a binary lacking the transport plugin, or a value differing from the current default transport name.","commonSituations":"Custom minimal builds without defaults; switching from default gRPC/mucp transport to QUIC/HTTP per docs without importing the plugin; upgrade where plugin package paths changed.","solutions":["Import _ \"go-micro.dev/v6/cmd/defaults\" or the specific transport plugin (e.g. _ \"go-micro.dev/v6/plugins/transport/quic\") and rebuild.","Confirm the exact registered transport name for your go-micro version.","Omit --transport to keep the current/default transport.","Check binary imports with `go list -deps` to verify the plugin is linked."],"exampleFix":"// before: transport not linked\nmicro --transport quic server\n// after: main.go\nimport _ \"go-micro.dev/v6/plugins/transport/quic\"\n// then:\nmicro --transport quic server","handlingStrategy":"validation","validationCode":"allowedTransports := map[string]bool{\"\": true, \"quic\": true, \"http\": true /* linked */}\nif !allowedTransports[*transportFlag] {\n    return fmt.Errorf(\"transport %q not linked; rebuild with cmd/defaults\", *transportFlag)\n}","typeGuard":null,"tryCatchPattern":"if err := c.Run(ctx); err != nil {\n    if strings.Contains(err.Error(), \"is not linked into this binary\") && strings.Contains(err.Error(), \"transport\") {\n        return fmt.Errorf(\"transport plugin missing: %w\", err)\n    }\n    return err\n}","preventionTips":["Import the transport plugin package (or cmd/defaults) in any binary accepting --transport.","Document valid transport names per build artifact.","Test flag-driven startup in CI to catch unlinked plugins before release."],"tags":["cli","transport","plugin-not-linked"],"backgroundTag":"plugin-not-linked","analyzedSha":"24529f140421a11a33b6999ab7944f2021cfd69c","analyzedAt":"2026-09-01T02:52:24.923Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}