package main import ( "context" "fmt" "github.com/moby/buildkit/client" ) func testBuildKit() { ctx := context.Background() // Test different connection methods hosts := []string{ "docker-container://desktop-linux", "unix://~/.docker/run/docker.sock", } for _, host := range hosts { fmt.Printf("Testing connection to: %s\n", host) c, err := client.New(ctx, host, nil) if err != nil { fmt.Printf(" ❌ Failed: %v\n", err) continue } // Try to get info _, err = c.Info(ctx) if err != nil { fmt.Printf(" ❌ Info failed: %v\n", err) c.Close() continue } fmt.Printf(" ✅ Success!\n") c.Close() } }