05 2020 档案
摘要:package main import ( "fmt" "math/rand" "time" ) //生产者 func producer(header string,channel chan<- string) { for{ channel <- fmt.Sprintf("%s: %v",heade
阅读全文
摘要: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
阅读全文
摘要:package main import ( _ "context" "database/sql" "fmt" _ "github.com/go-sql-driver/mysql" uuid "github.com/satori/go.uuid" ) /* CREATE TABLE `t_user_i
阅读全文
摘要:package main import ( "errors" "fmt" "strconv" "sync" "time" ) /* * 算法解释 * SnowFlake的结构如下(每部分用-分开):<br> * 0 - 0000000000 0000000000 0000000000 0000000
阅读全文