Requirements
- Go 1.21 or higher
- Go modules enabled (default in Go 1.16+)
Install via go get
The easiest way to install the Switchport SDK is usinggo get:
Add to go.mod
Alternatively, add it directly to yourgo.mod file:
Verify Installation
Verify that the SDK is installed correctly:Dependencies
The Switchport Go SDK has zero external dependencies - it uses only the Go standard library:net/http- For HTTP requests to the Switchport APIencoding/json- For JSON encoding/decodingtime- For timestamp handlingerrors- For error handling
Upgrading
To upgrade to the latest version:Using with Go Workspaces
If you’re using Go workspaces (Go 1.18+), the SDK works seamlessly:Troubleshooting
Module Cache Issues
If you encounter module cache issues, try clearing the cache:Go Version Issues
Make sure you’re using Go 1.21 or higher:Import Path Issues
Make sure you’re importing from the correct path:/switchport subpackage at the end.
Next Steps
Authentication
Set up your API key and authenticate

