Skip to main content

2 posts tagged with "go"

View All Tags

Go,Gin学习

· 20 min read
ayanami

Go & Gin & Gorm 学习

Go

Learn go by test

基本语法

package:类似namespace或者module

循环

func Repeat(character string) string {
var repeat string

godis源码阅读

· 33 min read
ayanami

tcp

echo

一个优雅超时关闭的方法

// WaitWithTimeout blocks until the WaitGroup counter is zero or timeout
// returns true if timeout
func (w *Wait) WaitWithTimeout(timeout time.Duration) bool {
c := make(chan struct{}, 1)
go func() {
defer close(c)