{"repo":"MarwanAlsoltany/serrors","free":true,"listed":false,"github":"https://github.com/MarwanAlsoltany/serrors","clone":"git clone https://github.com/MarwanAlsoltany/serrors.git","description":"Structured errors for Go: sentinel hierarchies, typed data, custom formatting, and slog integration.","language":"Go","stars":10,"topics":["error","error-handling","go","golang","logging","slog"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"serrors - Structured Errors for Go Go's standard error handling is minimal by design. It provides errors.New , fmt.Errorf , errors.Unwrap , errors.Join , errors.Is , errors.As , and then gets out of the way. For small programs, that is exactly right. For larger systems built from multiple layers and packages, the minimal approach leaves much to be desired and several practical problems unsolved. The key insight the standard library encodes — and that many codebases fail to act on — is that errors are values . Unlike exceptions, they are not just signals that \"something went wrong\"; they carry meaning, context, and identity that can be inspected, matched, and acted upon programmatically. fmt.Errorf with %w gets partway there, but it stops at wrapping: the resulting value carries the chain but exposes none of the structure. serrors exists to fill that gap. It takes that idea to its logical conclusion: errors are first-class, typed, structured values with an identity, an operation chain, attached data, and a formatting contract. The name follows the same convention as slog to log : the s stands for structured . Just as slog brought key-value context to logging, serrors brings structure, hierarchy, custom formatting, and inspection to errors without breaking compatibility with the standard library or introducing foreign concepts. serrors is opinionated. It makes deliberate choices about error message format, delimiter conventions, and the shape of the public API. If any of those ","default_branch":null,"files":null,"tree":[],"storefront":"/r/MarwanAlsoltany","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/MarwanAlsoltany/serrors/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}