context.ShouldBindJSON(map[string]interface{}{ "code": 0, "msg": "這是創(chuàng)建HTTPServer第四種方式", }) context.Status(200) })) } s := &http.Server{ Addr: ":8001", Handler: router, ReadTimeout: 1000 * time.Second, WriteTimeout: 1000 * time.Second, MaxHeaderBytes: 1 << 20, } ...
www.dbjr.com.cn/article/2271...htm 2025-6-7