摘要: package main import ( "fmt" "reflect" ) type Reflect struct { Name string `json:"name" test:"tag"` PassWord string Three int } func (m Reflect)Hello(v 阅读全文
posted @ 2021-01-05 18:27 海拉尔 阅读(1891) 评论(0) 推荐(0)
摘要: golang LRU package main type Node struct { Key,Value int //双链表 Pre,Next *Node } type LruCache struct { //现有元素数量 Size int //lru容量 Capacity int //map存储链 阅读全文
posted @ 2021-01-05 11:26 海拉尔 阅读(481) 评论(0) 推荐(0)
摘要: func main() { require:=make(chan int,5) for i:=0;i<5;i++{ require<-i } close(require) //设置定时器控制读取速率 ti:=time.Tick(time.Duration(1)*time.Second) //直接ra 阅读全文
posted @ 2021-01-05 09:59 海拉尔 阅读(1133) 评论(0) 推荐(0)