Go tricks from the trenches
summary
Command-line tooling and a reusable Go library power production workflows: egoscale backs a Cobra-based CLI, Terraform and Kubernetes integrations and the lego ACMEv2 usage, and the CLI demo successfully spawns and configures VMs. Concrete tricks include using struct tags and reflection to build REST URIs, hiding RPC verbs with an underscore field to force keyed construction, solving JSON MAC address formatting by aliasing or embedding net.HardwareAddr, and a small go/ast static checker that compares JSON API definitions to local structs and flags type mismatches.
AI-written summary · about








