Gin vv1.10.0 | Go vgo1.22.12
可以用 curl 直接测试接口:
# 测试ping curl /go/api/ping # 测试路径参数 curl /go/api/hello/张三 # 创建笔记 curl -X POST /go/api/notes \ -H "Content-Type: application/json" \ -d '{"title":"我的笔记","content":"内容"}'