Documentation
¶
Overview ¶
Hand-written (NOT generated). Ported from the legacy TS CLI's `features generate-types`; preserved across regen via persistentEdits.
Hand-written (NOT generated). `growthbook profiles` — manage named credential/server profiles (parity with the legacy CLI's profiles). Registered from root.go via a same-package reference, so the generated import block is never touched.
Hand-written (NOT generated). All customization of the generated root command is funneled through customRegister, so the ONLY edit to the generated root.go is a single `customRegister(rootCmd)` line (see .speakeasy/patches/). Keeping the patch to one line makes it robust across regenerations — there are no multi-line hunks whose context can drift.
Hand-written (NOT generated). Helper for the patched whoami command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BuildTime string
BuildTime is optionally set at build time via ldflags targeting the main package.
var Version = "1.0.0"
Version is the current version of the CLI, defaulting to the version from gen.yaml. It can be overridden at build time via ldflags targeting the main package, which propagates the value here (see cmd/growthbook/main.go):
go build -ldflags "-X main.version=x.y.z" ./cmd/growthbook
Functions ¶
func NewRootCommand ¶
NewRootCommand creates and returns the root command. This is exported for testing purposes to allow in-process command execution.
Types ¶
This section is empty.