MCPcopy
hub / github.com/sqlc-dev/sqlc / ParseEnv

Function ParseEnv

internal/cmd/cmd.go:148–159  ·  view source on GitHub ↗
(c *cobra.Command)

Source from the content-addressed store, hash-verified

146}
147
148func ParseEnv(c *cobra.Command) Env {
149 dr := c.Flag("dry-run")
150 r := c.Flag("remote")
151 nr := c.Flag("no-remote")
152 return Env{
153 DryRun: dr != nil && dr.Changed,
154 Debug: opts.DebugFromEnv(),
155 Experiment: opts.ExperimentFromEnv(),
156 Remote: r != nil && r.Value.String() == "true",
157 NoRemote: nr != nil && nr.Value.String() == "true",
158 }
159}
160
161var ErrPluginProcessDisabled = errors.New("plugin: process-based plugins disabled via SQLCDEBUG=processplugins=0")
162

Callers 5

push.goFile · 0.85
cmd.goFile · 0.85
verify.goFile · 0.85
NewCmdVetFunction · 0.85
createdb.goFile · 0.85

Calls 3

DebugFromEnvFunction · 0.92
ExperimentFromEnvFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected