What problem does it solve?
This Skill helps prevent common Go programming pitfalls such as nil panics, silent data corruption, and subtle runtime bugs, ensuring robust and secure code.
Core Features & Use Cases
- Nil Safety: Identifies and prevents nil-related panics.
- Slice & Map Safety: Mitigates aliasing and concurrent access issues.
- Numeric Safety: Ensures correct handling of type conversions and floating-point arithmetic.
- Resource Safety: Manages resource lifecycle and prevents leaks.
- Immutability & Defensive Copying: Promotes safe design patterns for struct internals.
- Initialization Safety: Ensures types are usable at zero value and initializes resources correctly.
- Use Case: When reviewing or developing Go code, use this Skill to detect and correct common mistakes, enhancing code reliability and maintainability.
Quick Start
Use the golang-safety skill to check your Go code for common pitfalls, such as nil checks, slice aliasing, and map concurrency issues.