Can this be shared? That way the service functions can return structs and we can test them easier
`
response, err := json.Marshal(divisions)
if err != nil {
http.Error(w, "Error marshalling JSON", http.StatusInternalServerError)
return
}
w.WriteHeader(http.StatusOK)
_, err = w.Write(response)
if err != nil {
http.Error(w, "Error writing response", http.StatusInternalServerError)
return
}`
Can this be shared? That way the service functions can return structs and we can test them easier
`
response, err := json.Marshal(divisions)
if err != nil {
http.Error(w, "Error marshalling JSON", http.StatusInternalServerError)
return
}