

I would love to learn to not worry, stress and ruminate about every little thing ever
I would love to learn to not worry, stress and ruminate about every little thing ever
If it was me personally I would just test the handlers separately rather than scaffolding the router entirely.
Either way, I suggest looking into using the standard lib http/httptest
https://pkg.go.dev/net/http/httptest
Here’s an snippet example of testing a handler
req, err := http.NewRequest(http.MethodGet, "/health", bytes.NewBuffer([]byte{}))
if err != nil {
t.Fatal(err)
}
rr := httptest.NewRecorder()
handler := http.HandlerFunc(srv.HealthCheckHandler)
handler.ServeHTTP(rr, req)
if rr.Code != http.StatusOK {
t.Fatalf("expect HTTP response code %d, got %d", tt.expectHttpCode, rr.Code)
}
It’s not quite as simple as that and there are other growing conditions that are required. If we take Arabica, it requires a very small window temperature window, sunlight but not so much it scorches the plant, a particular pH of soil, and consistent rainfall.
Climate change brings unpredictability to growing conditions so even if you had to move where you grow it, it won’t necessarily mean it’ll grow well. Plus different locations can bring on new diseases for the (coffee has its fair share of diseases to combat with) and so new varitals would need to be selected which is no simple task.
As the article points out, coffee is notorious for being fussy when growing it.
Ah yes a quote about beginners rapidly gaining beginner gains by practicing really does apply to a group of professionals trying to do their job in a business /s
It’s shocking the amount of morons people trying to do their job have to deal with nowadays. I’m sorry you have a colleague with the critical thinking ability of a punch drunk.