ZhangZhihui's Blog |
|
||
2024年12月4日
摘要:
Prefer jsonb. Text Search Vector Text Search Query zzhtest=> select B'0101' -- user's feature flags & B'0001' -- mask: if the result equals the mask, 阅读全文
2024年12月2日
摘要:
Fraction is precise, but slow. Floating point is fast, but imprecise. Two floating point: types real (float4) and double precision (float8). Domain is 阅读全文
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 阅读全文
摘要:
Makefile: ## help: print this help message help: @echo 'Usage:' @sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' confirm: @ech 阅读全文
摘要:
$ make migration name=create_example_table run: go run ./cmd/api psql: psql ${GREENLIGHT_DB_DSN} migration: @echo 'Creating migration files for ${name 阅读全文
2024年11月28日
摘要:
In routes.go: router.Handler(http.MethodGet, "/debug/vars", expvar.Handler()) func main() { expvar.NewString("version").Set(version) ... func main() { 阅读全文
摘要:
package main import ( "log" "net/http" ) const html = ` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> </head> <body> <h1>Simple CORS< 阅读全文
2024年11月22日
摘要:
In errors.go: func (app *application) authenticationRequiredResponse(w http.ResponseWriter, r *http.Request) { message := "you must be authenticated t 阅读全文
摘要:
const ( ScopeActivation = "activation" ScopeAuthentication = "authentication" ) // Token holds the data for a token. type Token struct { Plaintext str 阅读全文
2024年11月21日
摘要:
zzh@ZZHPC:/zdata/Github/greenlight$ migrate create -seq -ext .sql -dir ./migrations create_token_table /zdata/Github/greenlight/migrations/000005_crea 阅读全文
|
Copyright © 2024 ZhangZhihuiAAA
Powered by .NET 9.0 on Kubernetes |