Error Handling in Go (Part-2)
Creating errors with errors.New() function
If we don't need a custom type for an error, and we can work with a single error type then we can use errors.New() function to create an error on the fly.
Creating a new error is simple. We simply need to ca...
pratikjagrut.hashnode.dev9 min read