ZhangZhihui's Blog  
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 102 下一页

2024年11月28日

摘要: In routes.go: router.Handler(http.MethodGet, "/debug/vars", expvar.Handler()) func main() { expvar.NewString("version").Set(version) ... func main() { 阅读全文
posted @ 2024-11-28 21:22 ZhangZhihuiAAA 阅读(16) 评论(0) 推荐(0)
 
摘要: package main import ( "log" "net/http" ) const html = ` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> </head> <body> <h1>Simple CORS< 阅读全文
posted @ 2024-11-28 10:55 ZhangZhihuiAAA 阅读(15) 评论(0) 推荐(0)

2024年11月22日

摘要: In errors.go: func (app *application) authenticationRequiredResponse(w http.ResponseWriter, r *http.Request) { message := "you must be authenticated t 阅读全文
posted @ 2024-11-22 16:09 ZhangZhihuiAAA 阅读(26) 评论(0) 推荐(0)
 
摘要: const ( ScopeActivation = "activation" ScopeAuthentication = "authentication" ) // Token holds the data for a token. type Token struct { Plaintext str 阅读全文
posted @ 2024-11-22 10:10 ZhangZhihuiAAA 阅读(19) 评论(0) 推荐(0)

2024年11月21日

摘要: zzh@ZZHPC:/zdata/Github/greenlight$ migrate create -seq -ext .sql -dir ./migrations create_token_table /zdata/Github/greenlight/migrations/000005_crea 阅读全文
posted @ 2024-11-21 20:08 ZhangZhihuiAAA 阅读(18) 评论(0) 推荐(0)

2024年11月20日

摘要: How to change the cnfiguration for rate limiting in flight? How to change the configuration of pgxpool without restarting the application? How to dyna 阅读全文
posted @ 2024-11-20 17:25 ZhangZhihuiAAA 阅读(57) 评论(0) 推荐(0)
 
摘要: package main import ( "fmt" "os" ) func main() { fmt.Println(os.Executable()) fmt.Println(os.Getwd()) } zzh@ZZHPC:~/zd/Github/ztest$ go run main.go /t 阅读全文
posted @ 2024-11-20 11:36 ZhangZhihuiAAA 阅读(6) 评论(0) 推荐(0)

2024年11月19日

摘要: zzh@ZZHPC:~$ curl -w '\nTime: %{time_total}\n' -d "$BODY" localhost:4000/v1/users { "user": { "id": 6, "created_at": "2024-11-21T18:33:14+08:00", "nam 阅读全文
posted @ 2024-11-19 23:11 ZhangZhihuiAAA 阅读(9) 评论(0) 推荐(0)
 
摘要: zzh@ZZHPC:/zdata/Github/greenlight$ migrate create -seq -ext=.sql -dir=./migrations create_user_table /zdata/Github/greenlight/migrations/000004_creat 阅读全文
posted @ 2024-11-19 09:13 ZhangZhihuiAAA 阅读(12) 评论(0) 推荐(0)

2024年11月18日

摘要: zzh@ZZHPC:/zdata/Github/greenlight$ go run ./cmd/api time=2024-11-18T19:49:43.864+08:00 level=INFO msg="database connection pool established" time=202 阅读全文
posted @ 2024-11-18 21:37 ZhangZhihuiAAA 阅读(15) 评论(0) 推荐(0)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 102 下一页