posted @ 2024-11-14 20:33
ZhangZhihuiAAA
阅读(13)
推荐(0)
摘要:
func (app *application) writeJSON(w http.ResponseWriter, status int, data envelope, headers http.Header) error { js, err := json.MarshalIndent(data, "
阅读全文
posted @ 2024-11-14 18:52
ZhangZhihuiAAA
阅读(24)
推荐(0)
摘要:
We’re going to use the popular third-party package httprouter as the router for our application, instead of using http.ServeMux from the standard-libr
阅读全文
posted @ 2024-11-14 11:51
ZhangZhihuiAAA
阅读(16)
推荐(0)
摘要:
API versioning APIs which support real-world businesses and users often need to change their functionality and endpoints over time — sometimes in a ba
阅读全文
posted @ 2024-11-14 11:34
ZhangZhihuiAAA
阅读(9)
推荐(0)
摘要:
{ "workbench.startupEditor": "none", "[go]": { "editor.insertSpaces": true, "editor.formatOnSave": false }, "editor.fontSize": 16, "terminal.integrate
阅读全文
posted @ 2024-11-14 09:21
ZhangZhihuiAAA
阅读(18)
推荐(0)
摘要:
Method URL Pattern Action GET /v1/healthcheck Show application health and version informationGET /v1/movies Show the details of all moviesPOST /v1/mov
阅读全文
posted @ 2024-11-14 08:52
ZhangZhihuiAAA
阅读(9)
推荐(0)
摘要:
$ mkdir -p bin cmd/api internal migrations remote $ touch Makefile $ touch cmd/api/main.go At this point your project directory should look exactly li
阅读全文
posted @ 2024-11-14 08:42
ZhangZhihuiAAA
阅读(12)
推荐(0)