go-nil-map

Initialize Go maps with make before writes to prevent nil map panics.

3|Updated Nov 28, 2025
Search Tags:#go#map#nil
One-click install
npx skills add https://github.com/JamesPrial/claudefiles --skill go-nil-map
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-nil-map
Source: https://github.com/JamesPrial/claudefiles/tree/main/skills/golang/nil/map
Command: npx skills add https://github.com/JamesPrial/claudefiles --skill go-nil-map

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing to a nil map panics; reading from a nil map is safe but returns zero values.

Core Features & Use Cases

  • Initialization: Create maps with make before writes.
  • Defensive Pattern: Check nil before writes and provide safe defaults.

Quick Start

Initialize a map with make before insertions and verify read paths.