What problem does it solve?
This Skill eliminates the overhead of maintaining the third-party go.uber.org/zap logging dependency in Go projects, allowing teams to adopt the built-in log/slog package (introduced in Go 1.21) to reduce external dependencies and align with standard library tooling.
Core Features & Use Cases
- Complete API Mapping: Includes a full reference table to translate all common zap logging calls (including Sugar-style formatted calls and Fatal levels, which have no direct slog equivalent) to correct log/slog syntax.
- Viper-Compatible Log Initializer: Provides a ready-to-use log setup implementation that supports LOG_LEVEL and LOG_FORMAT configuration via viper, matching the configuration patterns used in the gosdk repository.
- Use Case: Perfect for Go teams modernizing their logging stack, eliminating the zap dependency, or ensuring new code uses only standard library logging tooling.
Quick Start
Use the migrate-zap-to-slog skill to replace all go.uber.org/zap imports and call sites in your Go project with standard log/slog equivalents.