Source: juststeveking-uk-astro.pages.dev

My First Go Module - go api problem
I have been playing with GoLang on and off now for around 3 years, but never really had chance to use it the way I wanted to. However, recently with a new client we needed to start building high throughput microservices for their distributed warehouse system.

One thing that was obviously clear, was that we would need to find a nice way to handle, track and explain errors that may occur in the system. In PHP I typically use a fantastic package called https://github.com/Crell/ApiProblem which is RFC compliant and handles errors very nicely.

type APIProblem struct { Title string `json:"title,omitempty"` Detail string `json:"detail,omitempty"` Status string `json:"status,omitempty"` Code string `json:"code,omitempty"` Meta *map[string]interface{} `json:"meta,omitempty"` }
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners