Go SDK: Migrate from V1 to V2
Go SDK: Migrate from V1 to V2
Go SDK: Migrate from V1 to V2
Skyflow Go SDK v2 introduces a new authentication model, multi-vault support, native Go data structures, and richer error diagnostics. This guide walks through the key changes with before/after code examples.
V1 required a token provider function. V2 lets you choose from five credential types.
V1:
V2:
V2 uses a functional options pattern and supports multiple vaults per client instance. Log levels are now per-instance instead of global.
V1:
V2:
Key changes:
VaultURL is replaced by ClusterIdEnv is now required (DEV, SANDBOX, PROD)V2 uses native Go maps and slices instead of third-party JSON objects. Responses use typed structs.
V1:
V2:
V1 response:
V2 response:
V2 uses a functional options pattern for cleaner optional parameter handling.
V1:
V2:
V2 errors include more detail to help with debugging.
V1:
V2:
Use the requestId field when contacting Skyflow support — it uniquely identifies the request for faster diagnosis.