随笔分类 -  go

摘要:package main import ( "fmt" "strings" "sync" "time" "github.com/google/uuid" ) func NewPubSub() *PubSubTrie { return &PubSubTrie{} } type PubSubTrie s 阅读全文
posted @ 2022-11-21 14:50 耀耀王 阅读(83) 评论(0) 推荐(0)
摘要:func StructToMap(v interface{}) (map[string]interface{}, error) { values := map[string]interface{}{} bytes, err := json.Marshal(v) if err != nil { ret 阅读全文
posted @ 2022-11-18 13:08 耀耀王 阅读(29) 评论(0) 推荐(0)
摘要:package main import ( "fmt" "regexp" "strings" ) var matchNonAlphaNumeric = regexp.MustCompile(`[^a-zA-Z0-9]+`) var matchFirstCap = regexp.MustCompile 阅读全文
posted @ 2022-11-18 11:29 耀耀王 阅读(541) 评论(0) 推荐(0)
摘要:package main import ( "crypto/rsa" "errors" "fmt" "io/ioutil" "os" "time" "github.com/dgrijalva/jwt-go" ) //https://cryptotools.net/rsagen //https://j 阅读全文
posted @ 2021-11-05 13:10 耀耀王 阅读(124) 评论(0) 推荐(0)