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

2024年11月29日

摘要: zzh@ZZHPC:/zdata/Github/greenlight$ go install honnef.co/go/tools/cmd/staticcheck no required module provides package honnef.co/go/tools/cmd/staticche 阅读全文
posted @ 2024-11-29 18:49 ZhangZhihuiAAA 阅读(18) 评论(0) 推荐(0)
 
摘要: Makefile: ## help: print this help message help: @echo 'Usage:' @sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' confirm: @ech 阅读全文
posted @ 2024-11-29 17:58 ZhangZhihuiAAA 阅读(11) 评论(0) 推荐(0)
 
摘要: $ make migration name=create_example_table run: go run ./cmd/api psql: psql ${GREENLIGHT_DB_DSN} migration: @echo 'Creating migration files for ${name 阅读全文
posted @ 2024-11-29 17:02 ZhangZhihuiAAA 阅读(10) 评论(0) 推荐(0)

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)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 102 下一页