摘要: 在设置cookie过期时间的时候,用当日剩余秒数与内置变量相乘报错invalid operation: second * time.Second (mismatched types int and time.Duration) Expires : time.Now().Add(10 * time.S 阅读全文
posted @ 2020-10-09 20:38 温柔的风 阅读(7287) 评论(0) 推荐(1) 编辑
摘要: demo 1 func getTodaySurplusSecond1() (int64,error) { layout := "2006-01-02" loc, _ := time.LoadLocation("Asia/Shanghai") t, err := time.ParseInLocatio 阅读全文
posted @ 2020-10-09 17:47 温柔的风 阅读(1110) 评论(0) 推荐(0) 编辑
摘要: func difference(slice1, slice2 []int) []int { //取要校验的和已经校验过的差集,找出需要校验的切片IP(找出slice1中 slice2中没有的) m := make(map[int]int) n := make([]int,0) inter := in 阅读全文
posted @ 2020-10-09 14:38 温柔的风 阅读(1894) 评论(2) 推荐(0) 编辑