Golang Error Handling
Golang 에러 처리 — 생성, %w로 감싸기, errors.Is/As, errors.Join, 커스텀 에러 유형, 센티넬 에러, panic/recover, 단일 처리 규칙, slog를 통한 구조화 로깅, HTTP 요청 로깅 미들웨어 및 samber/oops를 위한 생산 환경 에러. 대규모 로그 사용을 위해 라이브러리 기반의 로그 집계 3단계 도구와 호환되어 설계됨.
언제 사용하는가
idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors.
Built to make logs usable at scale with log aggregation 3rd-party tools.
Apply when creating, wrapping, inspecting, or logging errors in Go code.
For samber/oops specifics → See samber/cc-skills-golang@golang-samber-oops skill; for slog handler ecosystem → See samber/cc-skills-golang@golang-samber-slog skill.
설치 방법
npx skills add installs: 34628 --skill golang-error-handling