From e7bba51bb8bb41c462873c613bc6d4cf402a58d1 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Wed, 29 Jul 2026 16:45:00 -0230 Subject: 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. --- cmd/lulu/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmd') 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) -- cgit v1.2.3