flaglint-go Supported Scope
This page covers flaglint-go, the Go CLI. For the JavaScript/TypeScript CLI’s scope, see flaglint-js: Supported Scope.
flaglint-go detects LaunchDarkly Go server-side SDK evaluation calls from:
github.com/launchdarkly/go-server-sdk/v6github.com/launchdarkly/go-server-sdk/v7
API Coverage
Section titled “API Coverage”| Method | Detected | Risk |
|---|---|---|
BoolVariation / StringVariation / IntVariation / Float64Variation | Yes | Low (static key) |
*Ctx forms of the above | Yes | Low (static key) |
JSONVariation (and *Ctx) | Yes | Medium |
*VariationDetail(Ctx) methods | Yes | High |
AllFlagsState | Yes | High |
| Dynamic flag keys | Yes | High (overrides the method’s own risk) |
| Browser/mobile LaunchDarkly SDKs | No | — |
| Non-LaunchDarkly providers | No | — |
Identity Resolution Coverage
Section titled “Identity Resolution Coverage”flaglint-go proves client identity syntactically (no go/types, no build required) across an entire scan. See Identity Model for detail on each of these:
| Pattern | Resolved |
|---|---|
Direct constructor binding (x := ld.MakeClient(...)) | Yes |
Package-level var and struct-field assignment | Yes — across the whole scan, not just one file |
Composite-literal struct-field binding (&Integration{ldClient: client}) | Yes |
Multi-level field-selector chains (f.integ.ldClient.Method(...)), including generic structs | Yes |
Cross-package factory/getter functions (pkg.GetLdClient()) | Yes — requires a go.mod to compute real import paths |
Parameter-typed client bindings (func f(client *ld.LDClient)) | Yes |
Chained factory-call-then-method (pkg.GetLdClient().Method(...), no intermediate variable) | No — tracked |
Method values (f := client.BoolVariation; f(...)) | No — tracked |
| Interface satisfaction (client known only through an interface type) | No — tracked |
| Block-scoped variable shadowing within one function | No — can cause a false positive, see below — tracked |
A factory function returning a wrapper type (not *ld.LDClient itself) | No — tracked |
Nested go.mod files within one scanned tree (monorepo submodules) | Partial — tracked |
Every “No” above is a false-negative risk except one: block-scoped shadowing (issue #5) can cause a genuine false positive — a variable re-:=’d to an unrelated value inside a nested block is still treated as the outer real client. Every other gap fails safe (a missed detection, never a false positive) — flaglint-go’s non-negotiable rule is to under-detect rather than guess everywhere else. See Limitations.