{"repo":"reconquest/karma-go","free":true,"listed":false,"github":"https://github.com/reconquest/karma-go","clone":"git clone https://github.com/reconquest/karma-go.git","description":"Everything has a reason.","language":"Go","stars":18,"topics":["golang","errors","err","context","tags","logging"],"license":"MIT","category":"analytics","readme_excerpt":"karma-go karma-go is a Go library for error messages that should be read by humans under pressure. It keeps the normal Go error interface, but renders wrapping, context, and multi-errors as a hierarchy instead of one long colon chain. The standard errors package is good at identity: errors.Is , errors.As , and unwrapping. It is not trying to be an incident report. karma-go fills that gap without making you give up those checks. Very generous of software to need two jobs before breakfast. Installation Quick start Output: Each layer says what it was trying to do. The nested reason says why it did not happen. That is the whole trick: stop hiding structure inside punctuation. Why not just errors ? Use the standard library for standard-library things. Keep sentinel errors, typed errors, errors.Is , and errors.As . Use karma-go when the error also has to explain itself in logs, terminals, alerts, or JSON. A usual fmt.Errorf chain turns a failure path into a sentence: That preserves the wrapped error. It does not preserve structure. The request ID and user ID are now prose. Your log query has to scrape a sentence. The next person adds another : %w , then another value, and eventually the error line looks like a municipal tax form. With karma-go , each layer owns the context it knows: Output: That shape is easier to scan because the hierarchy is visible. It is also harder to damage by accident: adding a field does not rewrite the whole error sentence. What karma-go gives you - Hierar","default_branch":null,"files":null,"tree":[],"storefront":"/r/reconquest","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/reconquest/karma-go/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."}