Skip to content

v1.2.0

Choose a tag to compare

@repenguin22 repenguin22 released this 11 Jul 08:29

Additive only — no behavior changes for existing code (ROADMAP §4).

  • Added NewSkip(skip, code, msg) and WrapSkip(skip, err, msg)
    caller-skip constructors for error factories (external review round 6). A
    helper like apperr.NotFound(msg) built on plain New records its own
    line in every trace; skip=1 points the frame at the factory's caller
    instead (zap AddCallerSkip precedent). Separate functions, so the
    New/Wrap hot path is unchanged. skip=0 is exactly New/Wrap; a
    skip past the top of the stack records the "unknown" frame; a negative
    skip panics. Core coverage reaches 100% — the over-skip test exercises
    the previously unreachable caller() failure branch.