From 0e3696f09fa85495cf75adfc8354456c8df73d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D7=A0=CF=85=CE=B1=CE=B7=20=D7=A0=CF=85=CE=B1=CE=B7=D1=95?= =?UTF-8?q?=CF=83=CE=B7?= Date: Thu, 12 Mar 2026 08:01:35 -0700 Subject: [PATCH] fix(sdk): avoid package shadow in example The local variable `client` shadowed the package import, causing `*client.Client` in TaskFunc closures to fail with "client.Client is not a type". Co-Authored-By: Claude JIRA: None --- examples/sdk/orchestrator/features/container-targeting.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/sdk/orchestrator/features/container-targeting.go b/examples/sdk/orchestrator/features/container-targeting.go index 8f5c6da0..5f671e24 100644 --- a/examples/sdk/orchestrator/features/container-targeting.go +++ b/examples/sdk/orchestrator/features/container-targeting.go @@ -60,7 +60,7 @@ func main() { target = "_any" } - client := client.New(url, token) + apiClient := client.New(url, token) hooks := orchestrator.Hooks{ AfterTask: func(_ *orchestrator.Task, result orchestrator.TaskResult) { @@ -72,7 +72,7 @@ func main() { // WithDockerExecFn is required for Plan.Docker() to work. // In a real application, this would use the Docker SDK's // ContainerExecCreate/ContainerExecAttach APIs. - plan := orchestrator.NewPlan(client, + plan := orchestrator.NewPlan(apiClient, orchestrator.WithHooks(hooks), )