diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-07-29 16:45:00 -0230 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-07-29 16:45:00 -0230 |
| commit | e7bba51bb8bb41c462873c613bc6d4cf402a58d1 (patch) | |
| tree | a94f91656e52aaf5c8edb5aed02679bae8efab11 /cmd | |
| parent | 95acc996fdcc6221741a3072633c5753e88d0f07 (diff) | |
| download | lulu-e7bba51bb8bb41c462873c613bc6d4cf402a58d1.zip | |
sandbox and production client constructors
Previously this was a package-level configuration with Sandbox() and
Production() controlling the global ApiUrl variable. Now it's controlled
per-client.
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/lulu/main.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/lulu/main.go b/cmd/lulu/main.go index 0609279..45a5bef 100644 --- a/cmd/lulu/main.go +++ b/cmd/lulu/main.go @@ -24,7 +24,11 @@ func main() { creds, err := readCreds(cli.Sandbox) ctx.FatalIfErrorf(err) - clnt, err := lulu.NewClient(context.Background(), creds) + newClient := lulu.NewClient + if cli.Sandbox { + newClient = lulu.NewSandboxClient + } + clnt, err := newClient(context.Background(), creds) ctx.FatalIfErrorf(err) err = ctx.Run(cli.Globals, clnt) |