go-control-flow

Installation
SKILL.md

Go Control Flow

Read references/SWITCH-PATTERNS.md when using switch statements, type switches, or break with labels

Read references/BLANK-IDENTIFIER.md when using _, blank identifier imports, or compile-time interface checks


If with Initialization

if and switch accept an optional initialization statement. Use it to scope variables to the conditional block:

if err := file.Chmod(0664); err != nil {
    log.Print(err)
    return err
}
Related skills

More from cxuu/golang-skills

Installs
537
GitHub Stars
90
First Seen
Jan 27, 2026