TIL

Strategy pattern in Go

Replace inheritance with the Strategy pattern in Go using interfaces. Achieve composable, testable code without class hierarchies.

Retry function in Go

Build retry logic in Go without reflection using generics. Implement exponential backoff and configurable retry strategies with type safety.

Self-hosted Google Fonts in Hugo

Host Google Fonts locally in Hugo without CDN dependency. Download woff2 files, configure CSS, and improve performance while maintaining GDPR compliance.

Writing a TOTP client in Go

Build a TOTP-based 2FA client in Go using the standard library. Generate time-based one-time passwords like Google Authenticator.

Interface guards in Go

Use compile-time interface guards to verify type conformity in Go without runtime overhead. Learn the var _ Interface = (*Type)(nil) pattern.