Skip to content

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/v6
  • github.com/launchdarkly/go-server-sdk/v7
MethodDetectedRisk
BoolVariation / StringVariation / IntVariation / Float64VariationYesLow (static key)
*Ctx forms of the aboveYesLow (static key)
JSONVariation (and *Ctx)YesMedium
*VariationDetail(Ctx) methodsYesHigh
AllFlagsStateYesHigh
Dynamic flag keysYesHigh (overrides the method’s own risk)
Browser/mobile LaunchDarkly SDKsNo
Non-LaunchDarkly providersNo

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:

PatternResolved
Direct constructor binding (x := ld.MakeClient(...))Yes
Package-level var and struct-field assignmentYes — 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 structsYes
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)Notracked
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 functionNo — 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 documented false-negative risk, never a false-positive one — flaglint-go’s non-negotiable rule is to under-detect rather than guess. See Limitations.