errors
Go stdlib errors package extension. (by tlog-dev)
new
A helper function to create a pointer to a new object in Go 1.18+ (by earthboundkid)
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
errors
Posts with mentions or reviews of errors.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-10-15.
-
Share Your Code.. Share your most unique piece of Go code.
I have errors too ) https://github.com/nikandfor/errors
-
Proposal: errors.With(err, other error) error
Full code with few tests is here
-
Anyone using github.com/pkg/errors for stack traces?
I did the same :)
-
go-faster/errors: clear go error wrapping with caller (xerrors fork with Wrap)
I have errors package too.
-
Effective Error Handling in Golang
I want to add that when wrapping error you should add function name you've called not function name you are in. Caller of your function already knows what he is called and he'll wrap it if he needs to. Or even better use human message and function name you can get out of Program Counter attached to the error. Non-stdlib errors package can do that (I use my own).
-
e4: an error handling package
By the way I've experimented with errors either.
new
Posts with mentions or reviews of new.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-25.
-
Have yet to use generics...Am I missing out?
Yeah, I have a joke package that does this: https://github.com/carlmjohnson/new
- Share Your Code.. Share your most unique piece of Go code.
- Fun with generics 3: Pointer of value with generics
- Generic fun: new.Of - A helper function to create a pointer to a new object in Go 1.18+
- More fun with Go generics: A new.Of() helper function
What are some alternatives?
When comparing errors and new you can also consider the following projects:
errors - A drop-in replacement for Go errors, with some added sugar! Unwrap user-friendly messages, HTTP status code, easy wrapping with multiple error types.
pointer - Go package pointer provides helpers to get pointers to values of built-in types.
simplerr - Advanced Go error handling, made simple
spidy - Domain names collector - Crawl websites and collect domain names along with their availability status.
blockscan - a mini blockchain scanner
pcre - Pure-Go port of the PCRE2 regular expression engine.
dgo - Efficient, error-free and high-level library for Dart <-> Go interops.
snaky - snake game implementation using 2d array in Go
errors - Simple error handling primitives
stringdedup - String deduplication package for Go