OpenAPI schema validation (like type: integer) is too basic for enterprise security. What if you need to enforce that a database’s storage size is an even number, or that the requested environment matches a specific regex? In this episode, we write a Kubernetes Validating Webhook in Go to intercept and inspect Crossplane Claims.
In Episode 10, we learned that Composition Functions allow us to escape the limitations of YAML. In this episode, we will write a custom Go program that dynamically generates an array of AWS Subnets based on a single integer provided by the Application Developer.
Running ’terraform plan’ is not enough to guarantee your infrastructure works. In this final episode, we bridge the gap between DevOps and Software Engineering by writing automated Golang tests using Terratest. We will programmatically provision infrastructure, assert its correctness, and tear it down.
Theory is useless without execution. We assemble everything learned across 14 episodes — structs, pointers, error handling, JSON codecs, context timeouts, and concurrency — into a production-grade HTTP REST API.
Go includes a first-class test runner built into the go test CLI. You don’t need external test frameworks like Jest or JUnit to write unit tests, benchmarks, or fuzzers.
Before Go 1.18, writing a reusable function for finding a slice element required duplicate functions for int, string, and float64, or using reflection. Generics solve this using Type Parameters.
When an incoming HTTP request is cancelled by the client, every downstream database query and RPC call associated with that request must stop immediately. Go’s context.Context enforces this cancellation propagation.
Channel communication handles message passing, but shared memory synchronization requires standard primitives like sync.Mutex and sync.WaitGroup. Learn how to build thread-safe concurrent systems.
Do not communicate by sharing memory; instead, share memory by communicating. Goroutines and Channels form the core primitives of Go’s concurrency model.
If it walks like a duck and quacks like a duck, Go treats it like a duck. Interfaces in Go are satisfied implicitly, creating loose coupling and high testability across packages.