上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 69 下一页
摘要: git remote show origin //git 查看远程仓库,以及与本地仓库的关系 git remote prune origin //清理无效远程分支 git remote prune origin --dry-run //查看哪些分支需要清理 阅读全文
posted @ 2020-10-15 10:50 温柔的风 阅读(422) 评论(0) 推荐(0)
摘要: func Random2(strings []string) string { //字符串数组 for i := len(strings) - 1; i > 0; i-- { num := rand.Intn(i + 1) strings[i], strings[num] = strings[num 阅读全文
posted @ 2020-10-14 14:15 温柔的风 阅读(1953) 评论(0) 推荐(0)
摘要: //获取用户获取的优惠券列表 func GetCouponList(c *gin.Context) { defer func() { if r := recover(); r != nil { util.LogStack(r.(error)) c.JSON(RequestSuccess, gin.H 阅读全文
posted @ 2020-10-12 16:46 温柔的风 阅读(2066) 评论(0) 推荐(0)
摘要: 在设置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 温柔的风 阅读(7695) 评论(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 温柔的风 阅读(1152) 评论(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 温柔的风 阅读(2082) 评论(2) 推荐(0)
摘要: 来想象这样一个场景:你的垂直电商系统部署的IDC机房,在某一天发布了公告说,机房会在第二天凌晨做一次网络设备的割接,在割接过程中会不定时出现瞬间,或短时间网络中断。 机房网络的中断,肯定会对业务造成不利的影响,即使割接的时间在凌晨(业务的低峰期),作为技术负责人的你,也要尽量思考方案来规避隔离的影响 阅读全文
posted @ 2020-09-23 01:12 温柔的风 阅读(1540) 评论(0) 推荐(0)
摘要: API网关起到的作用(904) API网关(API Gateway)不是一个开源组件,而是一种架构模式,它是将一些服务共有的功能整合在一起,独立部署为单独的一层,用来解决一些服务治理的问题。你可以把它看作系统的边界,它可以对出入系统的流量做统一的管控。 在我看来,API网关可以分为两类:一类叫做入口 阅读全文
posted @ 2020-09-23 00:53 温柔的风 阅读(913) 评论(0) 推荐(0)
摘要: 负载均衡服务大体上可以分为两大类:一类是代理类的负载均衡服务;另一类是客户端负载均衡服务。 代理类的负载均衡服务,以单独的服务方式部署,所有的请求都要先经过负载均衡服务,在负载均衡服务中,选出一个合适的服务节点后,再由负载均衡服务,调用这个服务节点来实现流量的分发。 由于这类服务需要承担全量的请求, 阅读全文
posted @ 2020-09-23 00:34 温柔的风 阅读(570) 评论(0) 推荐(0)
摘要: package util import ( "crypto/md5" "encoding/hex" "fmt" "os" "runtime" "strconv" "time" ) var strCGroupLogID string = "" func LogRecord(msg string, le 阅读全文
posted @ 2020-08-26 18:06 温柔的风 阅读(2539) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 69 下一页