go baby go

This commit is contained in:
2025-09-13 09:16:23 -07:00
parent f4821e9d3f
commit fda7d7e54a
86 changed files with 8861 additions and 126 deletions

View File

@@ -0,0 +1,14 @@
package testutils
import (
"net/http"
"net/http/httptest"
)
func MockJSONResponse(code int, body string) *httptest.Server {
return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(code)
w.Write([]byte(body))
}))
}