Skip to content

Instantly share code, notes, and snippets.

View zhenzou's full-sized avatar
🏠
Coding

september zhenzou

🏠
Coding
  • 深圳
View GitHub Profile
@zhenzou
zhenzou / check.go
Last active January 22, 2022 10:45
handle checked error with go generic
package main
func Check[T any](r T, err error) T {
if err != nil {
panic(err)
}
return r
}
@zhenzou
zhenzou / client.go
Last active May 10, 2018 04:29
kcp_echo
package main
import (
"fmt"
"encoding/binary"
"github.com/xtaci/kcp-go"
)
func Int2Bytes(i int) []byte {