|
You are here |
alexrichey.com | ||
| | | | |
linksort.com
|
|
| | | | | In writing a REST API, we have to deal with at least two types of errors. Client errors: These errors are the fault of the user, e.g., providing an invalid... | |
| | | | |
www.joeshaw.org
|
|
| | | | | A scheme for consistent and safe HTTP API errors | |
| | | | |
hjr265.me
|
|
| | | | | I know many will start with something like Gin whenever they are working on a JSON/HTTP-based backend in Go. I, not entirely sure if the minority, try to stick to Go's built-in net/http package and, at most, use Gorilla Mux in most of my Go projects. And so serving something simple like JSON is no different from the package's point of view as any other content type: whatever it is, write it out to the w, the http. | |
| | | | |
www.ardanlabs.com
|
|
| | | I wanted to send an email from my TraceLog package when a critical exception occurred. Fortunately Go's standard library has a package called smpt which can be found inside the net package. When you look at the documentation you are left wanting. I spent 20 minutes researching how to use this package. After fighting through the parameters and bugs, I came up with this sample code: package main import ( | ||