摘要: 阅读全文
posted @ 2022-05-20 22:54 ascertain 阅读(23) 评论(0) 推荐(0) 编辑
摘要: # # proxy_cache # # proxy_cache_path 必须位于http块, levels 指定缓存空间三层目录, 200m指内存缓存空间, max_size硬盘缓存空间 proxy_cache_path /var/cache/nginx/proxy levels=2:2:2 ke 阅读全文
posted @ 2022-05-20 21:52 ascertain 阅读(61) 评论(0) 推荐(0) 编辑
摘要: https://github.com/go-redis/redis package main import ( "context" "fmt" "time" "github.com/go-redis/redis/v8" ) var ( ctx context.Context rdb *redis.C 阅读全文
posted @ 2022-05-20 17:47 ascertain 阅读(26) 评论(0) 推荐(0) 编辑
摘要: Server: package main import ( "fmt" "net" ) func main() { fmt.Println("net.Listen") listen, err := net.Listen("tcp", "0.0.0.0:5555") if err != nil { f 阅读全文
posted @ 2022-05-20 16:51 ascertain 阅读(21) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" "reflect" ) type Vale struct { Name string `json:"name,omitempty"` Age int `json:"vale_age,omitempty"` Score float32 `json 阅读全文
posted @ 2022-05-20 15:31 ascertain 阅读(24) 评论(0) 推荐(0) 编辑
摘要: https://stackoverflow.com/questions/31650192/whats-the-full-name-for-iota-in-golang 一个常量块中,一个常量没有赋值,取上个常量的值 iota从0开始,每行++ 不推荐使用iota 阅读全文
posted @ 2022-05-20 12:12 ascertain 阅读(15) 评论(0) 推荐(0) 编辑