Go Defensive

Use when hardening Go code at API boundaries: copy slices/maps on entry and return, defer cleanup, verify interface compliance at compile time, model time with time.Time/time.Duration, design enum zero values, prefer crypto/rand, and inject clocks for testability. Apply proactively when reviewing for robustness. Error-handling strategy: see go-error-handling.

muratmirgun 66628d2 5 files · 13.5 KB Updated

File contents

muratmirgun/gophers/tree/main/skills/go-defensive commit 66628d28a3

Frequently asked questions

npx skillmds@latest add muratmirgun/go-defensive