Go,Gin学习July 11, 2024 · 20 min readayanamiGo & Gin & Gorm 学习 Go Learn go by test 基本语法 package:类似namespace或者module 循环 func Repeat(character string) string { var repeat string
godis源码阅读July 11, 2024 · 33 min readayanamitcp echo 一个优雅超时关闭的方法 // WaitWithTimeout blocks until the WaitGroup counter is zero or timeout// returns true if timeoutfunc (w *Wait) WaitWithTimeout(timeout time.Duration) bool { c := make(chan struct{}, 1) go func() { defer close(c)