摘要:
Fraction is precise, but slow. Floating point is fast, but imprecise. Two floating point: types real (float4) and double precision (float8). Domain is
阅读全文
posted @ 2024-12-02 18:24
ZhangZhihuiAAA
阅读(28)
推荐(0)
摘要:
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
阅读(26)
推荐(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
阅读(16)
推荐(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
阅读(18)
推荐(0)
摘要:
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
阅读(24)
推荐(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
阅读(19)
推荐(0)
摘要:
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
阅读(34)
推荐(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
阅读(24)
推荐(0)
摘要:
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
阅读(26)
推荐(0)
摘要:
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
阅读(73)
推荐(0)