05 2020 档案

摘要:package main import ( "fmt" "math/rand" "time" ) //生产者 func producer(header string,channel chan<- string) { for{ channel <- fmt.Sprintf("%s: %v",heade 阅读全文
posted @ 2020-05-14 16:50 瑾谦 阅读(211) 评论(0) 推荐(0) 编辑
摘要:package main import ( "fmt" "github.com/chilts/sid" "github.com/kjk/betterguid" "github.com/oklog/ulid" "github.com/rs/xid" "github.com/satori/go.uuid 阅读全文
posted @ 2020-05-14 16:39 瑾谦 阅读(2643) 评论(0) 推荐(0) 编辑
摘要:package main import ( _ "context" "database/sql" "fmt" _ "github.com/go-sql-driver/mysql" uuid "github.com/satori/go.uuid" ) /* CREATE TABLE `t_user_i 阅读全文
posted @ 2020-05-14 13:50 瑾谦 阅读(440) 评论(0) 推荐(0) 编辑
摘要:package main import ( "errors" "fmt" "strconv" "sync" "time" ) /* * 算法解释 * SnowFlake的结构如下(每部分用-分开):<br> * 0 - 0000000000 0000000000 0000000000 0000000 阅读全文
posted @ 2020-05-12 14:34 瑾谦 阅读(2655) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示