npx claudepluginhub jamesprial/prial-plugins --plugin golang-workflowThis skill uses the workspace's default tool permissions.
Reading from nil map returns zero value. Writing to nil map panics.
Enforces defensive Go coding to prevent nil panics, append aliasing, map/channel access bugs, defer pitfalls, numeric issues, and data corruption in Go code.
Guides Go slices, maps, arrays usage: new vs make, append, nil vs empty slices for JSON, map sets, boundary copying. Activates for collection building/manipulation.
Provides idiomatic Go patterns for simple, maintainable code: zero values, accept interfaces return structs, contextual error wrapping, custom errors. Useful when writing, reviewing, or refactoring Go.
Share bugs, ideas, or general feedback.
Reading from nil map returns zero value. Writing to nil map panics.
var m map[string]int // nil map
m["key"] = 42 // PANIC: assignment to entry in nil map
m := make(map[string]int)
m["key"] = 42 // OK
var m map[string]int // nil map
v := m["key"] // OK, v = 0 (zero value)
v, ok := m["key"] // OK, v = 0, ok = false
if m == nil {
m = make(map[string]int)
}
m["key"] = 42