refactor: upgrade go dependencies, remove unnecessary dependencies and code
This commit is contained in:
parent
dcad790712
commit
e3ddd8447b
|
@ -1,82 +0,0 @@
|
|||
package coll
|
||||
|
||||
// Queue 队列, 先进先出
|
||||
type Queue[T any] []T
|
||||
|
||||
func NewQueue[T any](elems ...T) Queue[T] {
|
||||
if len(elems) > 0 {
|
||||
data := make([]T, len(elems))
|
||||
copy(data, elems)
|
||||
return data
|
||||
} else {
|
||||
return Queue[T]{}
|
||||
}
|
||||
}
|
||||
|
||||
// Push 尾部插入元素
|
||||
func (q *Queue[T]) Push(elem T) {
|
||||
if q == nil {
|
||||
return
|
||||
}
|
||||
*q = append(*q, elem)
|
||||
}
|
||||
|
||||
// PushN 尾部插入多个元素
|
||||
func (q *Queue[T]) PushN(elems ...T) {
|
||||
if q == nil {
|
||||
return
|
||||
}
|
||||
if len(elems) <= 0 {
|
||||
return
|
||||
}
|
||||
*q = append(*q, elems...)
|
||||
}
|
||||
|
||||
// Pop 移除并返回头部元素
|
||||
func (q *Queue[T]) Pop() (T, bool) {
|
||||
var elem T
|
||||
if q == nil || len(*q) <= 0 {
|
||||
return elem, false
|
||||
}
|
||||
elem = (*q)[0]
|
||||
*q = (*q)[1:]
|
||||
return elem, true
|
||||
}
|
||||
|
||||
func (q *Queue[T]) PopN(n int) []T {
|
||||
if q == nil {
|
||||
return []T{}
|
||||
}
|
||||
|
||||
var popElems []T
|
||||
if n <= 0 {
|
||||
return []T{}
|
||||
}
|
||||
|
||||
l := len(*q)
|
||||
if n >= l {
|
||||
popElems = *q
|
||||
*q = []T{}
|
||||
return *q
|
||||
}
|
||||
|
||||
popElems = (*q)[:n]
|
||||
*q = (*q)[n:]
|
||||
return popElems
|
||||
}
|
||||
|
||||
// Clear 移除所有元素
|
||||
func (q *Queue[T]) Clear() {
|
||||
if q == nil {
|
||||
return
|
||||
}
|
||||
*q = []T{}
|
||||
}
|
||||
|
||||
func (q Queue[T]) IsEmpty() bool {
|
||||
return len(q) <= 0
|
||||
}
|
||||
|
||||
func (q Queue[T]) Size() int {
|
||||
return len(q)
|
||||
}
|
|
@ -1,11 +1,10 @@
|
|||
package coll
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
json "github.com/bytedance/sonic"
|
||||
"sort"
|
||||
. "tinyrdm/backend/utils"
|
||||
"tinyrdm/backend/utils/rand"
|
||||
)
|
||||
|
||||
type Void struct{}
|
||||
|
@ -167,31 +166,6 @@ func (s Set[T]) Filter(filterFunc func(i T) bool) []T {
|
|||
return ret
|
||||
}
|
||||
|
||||
// RandomElem 随机抽取一个元素
|
||||
// @param remove 随机出来的元素是否同时从集合中移除
|
||||
// @return 抽取的元素
|
||||
// @return 是否抽取成功
|
||||
func (s Set[T]) RandomElem(remove bool) (T, bool) {
|
||||
size := s.Size()
|
||||
if size > 0 {
|
||||
selIdx := rand.Intn(size)
|
||||
idx := 0
|
||||
for elem := range s {
|
||||
if idx == selIdx {
|
||||
if remove {
|
||||
delete(s, elem)
|
||||
}
|
||||
return elem, true
|
||||
} else {
|
||||
idx++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var r T
|
||||
return r, false
|
||||
}
|
||||
|
||||
// Size 集合长度
|
||||
func (s Set[T]) Size() int {
|
||||
return len(s)
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
package coll
|
||||
|
||||
// Stack 栈, 先进后出
|
||||
type Stack[T any] []T
|
||||
|
||||
func NewStack[T any](elems ...T) Stack[T] {
|
||||
if len(elems) > 0 {
|
||||
data := make([]T, len(elems))
|
||||
copy(data, elems)
|
||||
return data
|
||||
} else {
|
||||
return Stack[T]{}
|
||||
}
|
||||
}
|
||||
|
||||
// Push 顶部添加一个元素
|
||||
func (s *Stack[T]) Push(elem T) {
|
||||
if s == nil {
|
||||
panic("queue should not be nil")
|
||||
}
|
||||
*s = append(*s, elem)
|
||||
}
|
||||
|
||||
// PushN 顶部添加一个元素
|
||||
func (s *Stack[T]) PushN(elems ...T) {
|
||||
if s == nil {
|
||||
panic("queue should not be nil")
|
||||
}
|
||||
if len(elems) <= 0 {
|
||||
return
|
||||
}
|
||||
*s = append(*s, elems...)
|
||||
}
|
||||
|
||||
// Pop 移除并返回顶部元素
|
||||
func (s *Stack[T]) Pop() T {
|
||||
if s == nil {
|
||||
panic("queue should not be nil")
|
||||
}
|
||||
l := len(*s)
|
||||
popElem := (*s)[l-1]
|
||||
*s = (*s)[:l-1]
|
||||
return popElem
|
||||
}
|
||||
|
||||
// PopN 移除并返回顶部多个元素
|
||||
func (s *Stack[T]) PopN(n int) []T {
|
||||
if s == nil {
|
||||
panic("queue should not be nil")
|
||||
}
|
||||
var popElems []T
|
||||
if n <= 0 {
|
||||
return popElems
|
||||
}
|
||||
|
||||
l := len(*s)
|
||||
if n >= l {
|
||||
popElems = *s
|
||||
*s = []T{}
|
||||
return *s
|
||||
}
|
||||
|
||||
popElems = (*s)[l-n:]
|
||||
*s = (*s)[:l-n]
|
||||
|
||||
// 翻转弹出结果
|
||||
pl := len(popElems)
|
||||
for i := 0; i < pl/2; i++ {
|
||||
popElems[i], popElems[pl-i-1] = popElems[pl-i-1], popElems[i]
|
||||
}
|
||||
return popElems
|
||||
}
|
||||
|
||||
// Clear 移除所有元素
|
||||
func (s *Stack[T]) Clear() {
|
||||
if s == nil {
|
||||
panic("queue should not be nil")
|
||||
}
|
||||
*s = []T{}
|
||||
}
|
||||
|
||||
func (s Stack[T]) IsEmpty() bool {
|
||||
return len(s) <= 0
|
||||
}
|
||||
|
||||
func (s Stack[T]) Size() int {
|
||||
return len(s)
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
package rand
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 随机对象缓存池(解决自带随机函数全局抢锁问题)
|
||||
var randObjectPool = sync.Pool{
|
||||
New: func() interface{} {
|
||||
return rand.New(rand.NewSource(time.Now().UnixNano()))
|
||||
},
|
||||
}
|
||||
var lowerChar = []rune("abcdefghijklmnopqrstuvwxyz") // strings.Split("abcdefghijklmnopqrstuvwxyz", "")
|
||||
var upperChar = []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ") // strings.Split("ABCDEFGHIJKLMNOPQRSTUVWXYZ", "")
|
||||
var numberChar = []rune("0123456789") // strings.Split("0123456789", "")
|
||||
var numberAndChar = append(lowerChar, numberChar...)
|
||||
|
||||
func init() {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
}
|
||||
|
||||
func Intn[T ~int](n T) T {
|
||||
r := randObjectPool.Get()
|
||||
res := r.(*rand.Rand).Intn(int(n))
|
||||
randObjectPool.Put(r)
|
||||
return T(res)
|
||||
}
|
||||
|
||||
func IntnCount[T ~int](n T, count int) []T {
|
||||
res := make([]T, count)
|
||||
r := randObjectPool.Get()
|
||||
for i := 0; i < count; i++ {
|
||||
res[i] = T(r.(*rand.Rand).Intn(int(n)))
|
||||
}
|
||||
randObjectPool.Put(r)
|
||||
return res
|
||||
}
|
||||
|
||||
// Int31n 生成<n的32位整形
|
||||
func Int31n[T ~int32](n T) T {
|
||||
r := randObjectPool.Get()
|
||||
res := r.(*rand.Rand).Int31n(int32(n))
|
||||
randObjectPool.Put(r)
|
||||
return T(res)
|
||||
}
|
||||
|
||||
// Int63n 生成小于n的64位整形
|
||||
func Int63n[T ~int64](n T) T {
|
||||
r := randObjectPool.Get()
|
||||
res := r.(*rand.Rand).Int63n(int64(n))
|
||||
randObjectPool.Put(r)
|
||||
return T(res)
|
||||
}
|
||||
|
||||
// RangeInt 获取范围内的随机整数[min, max)
|
||||
func RangeInt[T ~int](min, max T) T {
|
||||
if min > max {
|
||||
min, max = max, min
|
||||
}
|
||||
return Intn(max-min) + min
|
||||
}
|
||||
|
||||
// RangeString 生成随机字符串
|
||||
func RangeString(charSet []rune, n int) string {
|
||||
r := randObjectPool.Get()
|
||||
|
||||
res := strings.Builder{}
|
||||
size := len(charSet)
|
||||
for i := 0; i < n; i++ {
|
||||
res.WriteRune(charSet[r.(*rand.Rand).Intn(size)])
|
||||
}
|
||||
randObjectPool.Put(r)
|
||||
return res.String()
|
||||
}
|
||||
|
||||
// LowerString 生成随机指定长度小写字母
|
||||
func LowerString(n int) string {
|
||||
return RangeString(lowerChar, n)
|
||||
}
|
||||
|
||||
// UpperString 生成随机指定长度大写字母
|
||||
func UpperString(n int) string {
|
||||
return RangeString(upperChar, n)
|
||||
}
|
||||
|
||||
// NumberString 生成随机指定长度数字字符串
|
||||
func NumberString(n int) string {
|
||||
return RangeString(numberChar, n)
|
||||
}
|
||||
|
||||
// CharNumberString 生成随机指定长度小写字母和数字
|
||||
func CharNumberString(n int) string {
|
||||
return RangeString(numberAndChar, n)
|
||||
}
|
||||
|
||||
// Shuffle 执行指定次数打乱
|
||||
func Shuffle(n int, swap func(i, j int)) {
|
||||
r := randObjectPool.Get()
|
||||
r.(*rand.Rand).Shuffle(n, swap)
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
package rand
|
||||
|
||||
import (
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// WeightObject 权重单项
|
||||
type WeightObject[T any] struct {
|
||||
Obj T
|
||||
Weight int
|
||||
}
|
||||
|
||||
// WeightRandom 根据权重随机
|
||||
type WeightRandom[T any] struct {
|
||||
WeightObject []WeightObject[T]
|
||||
totalWeight int
|
||||
randObj *rand.Rand
|
||||
lk sync.Mutex
|
||||
}
|
||||
|
||||
func NewWeightRandom[T any]() *WeightRandom[T] {
|
||||
return &WeightRandom[T]{
|
||||
WeightObject: []WeightObject[T]{},
|
||||
totalWeight: 0,
|
||||
randObj: rand.New(rand.NewSource(time.Now().UnixNano())),
|
||||
}
|
||||
}
|
||||
|
||||
func (w *WeightRandom[T]) Add(object T, weight int) {
|
||||
weightObj := WeightObject[T]{
|
||||
Obj: object,
|
||||
Weight: weight,
|
||||
}
|
||||
w.AddObject(weightObj)
|
||||
}
|
||||
|
||||
// AddObject 添加单个权重对象
|
||||
func (w *WeightRandom[T]) AddObject(weightObject WeightObject[T]) {
|
||||
if weightObject.Weight <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
exists := false
|
||||
for i, object := range w.WeightObject {
|
||||
if cmp.Equal(weightObject.Obj, object.Obj) {
|
||||
// 已经存在, 覆盖权重
|
||||
w.subWeight(object.Weight)
|
||||
w.WeightObject[i].Weight = weightObject.Weight
|
||||
w.addWeight(weightObject.Weight)
|
||||
exists = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !exists {
|
||||
// 已经存在, 覆盖权重
|
||||
w.WeightObject = append(w.WeightObject, weightObject)
|
||||
w.addWeight(weightObject.Weight)
|
||||
}
|
||||
}
|
||||
|
||||
// AddObjects 添加多个权重对象
|
||||
func (w *WeightRandom[T]) AddObjects(object []WeightObject[T]) {
|
||||
for _, weightObject := range object {
|
||||
w.AddObject(weightObject)
|
||||
}
|
||||
}
|
||||
|
||||
func (w *WeightRandom[T]) addWeight(weight int) {
|
||||
if w.totalWeight < 0 {
|
||||
w.totalWeight = 0
|
||||
}
|
||||
w.totalWeight += weight
|
||||
}
|
||||
|
||||
func (w *WeightRandom[T]) subWeight(weight int) {
|
||||
if w.totalWeight-weight < 0 {
|
||||
w.totalWeight = 0
|
||||
} else {
|
||||
w.totalWeight -= weight
|
||||
}
|
||||
}
|
||||
|
||||
// Next 通过权重随机到下一个
|
||||
func (w *WeightRandom[T]) Next() T {
|
||||
if w.totalWeight > 0 {
|
||||
w.lk.Lock()
|
||||
randomWeight := w.randObj.Intn(w.totalWeight)
|
||||
w.lk.Unlock()
|
||||
weightCount := 0
|
||||
for _, object := range w.WeightObject {
|
||||
weightCount += object.Weight
|
||||
if weightCount > randomWeight {
|
||||
return object.Obj
|
||||
}
|
||||
}
|
||||
}
|
||||
var noop T
|
||||
return noop
|
||||
}
|
|
@ -5,7 +5,6 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
. "tinyrdm/backend/utils"
|
||||
"tinyrdm/backend/utils/rand"
|
||||
)
|
||||
|
||||
// Get 获取指定索引的值, 如果不存在则返回默认值
|
||||
|
@ -377,74 +376,6 @@ func RemoveRight[S ~[]T, T comparable](arr S, val T) S {
|
|||
return arr
|
||||
}
|
||||
|
||||
// RandomElem 从切片中随机抽一个
|
||||
func RandomElem[S ~[]T, T any](arr S) T {
|
||||
l := len(arr)
|
||||
if l <= 0 {
|
||||
var r T
|
||||
return r
|
||||
}
|
||||
return arr[rand.Intn(l)]
|
||||
}
|
||||
|
||||
// RandomElems 从切片中随机抽多个
|
||||
// 如果切片长度为空, 则返回空切片
|
||||
func RandomElems[S ~[]T, T any](arr S, count int) []T {
|
||||
l := len(arr)
|
||||
ret := make([]T, 0, l)
|
||||
if l <= 0 {
|
||||
return ret
|
||||
}
|
||||
|
||||
idxList := rand.IntnCount(l, count)
|
||||
for _, idx := range idxList {
|
||||
ret = append(ret, arr[idx])
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
// RandomUniqElems 从切片中随机抽多个不同的元素
|
||||
// 如果切片长度为空, 则返回空切片
|
||||
// 如果所需数量大于切片唯一元素数量, 则返回整个切片
|
||||
func RandomUniqElems[S ~[]T, T Hashable](arr S, count int) []T {
|
||||
if len(arr) <= 0 {
|
||||
// 可选列表为空, 返回空切片
|
||||
return []T{}
|
||||
}
|
||||
// 转换为集合
|
||||
uniqList := Unique(arr)
|
||||
uniqLen := len(uniqList)
|
||||
if uniqLen <= count {
|
||||
// 可选集合总数<=所需元素数量, 直接返回整个可选集合
|
||||
return uniqList
|
||||
}
|
||||
|
||||
if count >= uniqLen/2 {
|
||||
// 所需唯一元素大于可选集合一半, 随机筛掉(uniqLen-count)个元素
|
||||
for i := 0; i < uniqLen-count; i++ {
|
||||
uniqList = Remove(uniqList, rand.Intn(uniqLen-i))
|
||||
}
|
||||
return uniqList
|
||||
} else {
|
||||
// 所需唯一元素小于可选集合一半, 随机抽取count个元素
|
||||
res := make([]T, count)
|
||||
var idx int
|
||||
for i := 0; i < count; i++ {
|
||||
idx = rand.Intn(uniqLen - i)
|
||||
res[i] = uniqList[idx]
|
||||
uniqList = Remove(uniqList, idx)
|
||||
}
|
||||
return res
|
||||
}
|
||||
}
|
||||
|
||||
// Clone 复制切片
|
||||
func Clone[S ~[]T, T any](src S) S {
|
||||
dest := make(S, len(src))
|
||||
copy(dest, src)
|
||||
return dest
|
||||
}
|
||||
|
||||
// Count 统计制定条件元素数量
|
||||
func Count[S ~[]T, T any](arr S, filter func(int) bool) int {
|
||||
count := 0
|
||||
|
|
27
go.mod
27
go.mod
|
@ -4,8 +4,6 @@ go 1.21
|
|||
|
||||
require (
|
||||
github.com/adrg/sysfont v0.1.2
|
||||
github.com/bytedance/sonic v1.10.0
|
||||
github.com/google/go-cmp v0.5.9
|
||||
github.com/redis/go-redis/v9 v9.1.0
|
||||
github.com/vrischmann/userdir v0.0.0-20151206171402-20f291cebd68
|
||||
github.com/wailsapp/wails/v2 v2.5.1
|
||||
|
@ -13,18 +11,15 @@ require (
|
|||
)
|
||||
|
||||
require (
|
||||
github.com/adrg/strutil v0.2.2 // indirect
|
||||
github.com/adrg/xdg v0.3.0 // indirect
|
||||
github.com/adrg/strutil v0.3.0 // indirect
|
||||
github.com/adrg/xdg v0.4.0 // indirect
|
||||
github.com/bep/debounce v1.2.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
|
||||
github.com/chenzhuoyu/iasm v0.9.0 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/go-ole/go-ole v1.2.6 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||
github.com/google/uuid v1.3.1 // indirect
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
||||
github.com/labstack/echo/v4 v4.10.2 // indirect
|
||||
github.com/labstack/echo/v4 v4.11.1 // indirect
|
||||
github.com/labstack/gommon v0.4.0 // indirect
|
||||
github.com/leaanthony/go-ansi-parser v1.6.1 // indirect
|
||||
github.com/leaanthony/gosod v1.0.3 // indirect
|
||||
|
@ -38,16 +33,14 @@ require (
|
|||
github.com/samber/lo v1.38.1 // indirect
|
||||
github.com/stretchr/testify v1.8.3 // indirect
|
||||
github.com/tkrajina/go-reflector v0.5.6 // indirect
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
github.com/valyala/fasttemplate v1.2.2 // indirect
|
||||
github.com/wailsapp/mimetype v1.4.1 // indirect
|
||||
golang.org/x/arch v0.3.0 // indirect
|
||||
golang.org/x/crypto v0.10.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
|
||||
golang.org/x/net v0.11.0 // indirect
|
||||
golang.org/x/sys v0.9.0 // indirect
|
||||
golang.org/x/text v0.10.0 // indirect
|
||||
golang.org/x/crypto v0.12.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect
|
||||
golang.org/x/net v0.14.0 // indirect
|
||||
golang.org/x/sys v0.11.0 // indirect
|
||||
golang.org/x/text v0.12.0 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
||||
)
|
||||
|
||||
|
|
75
go.sum
75
go.sum
|
@ -1,49 +1,35 @@
|
|||
github.com/adrg/strutil v0.2.2 h1:XSd9+o2xaOon2oRum0JymNT+f0nfLiAiDzGOcjcIsMI=
|
||||
github.com/adrg/strutil v0.2.2/go.mod h1:EF2fjOFlGTepljfI+FzgTG13oXthR7ZAil9/aginnNQ=
|
||||
github.com/adrg/strutil v0.3.0 h1:bi/HB2zQbDihC8lxvATDTDzkT4bG7PATtVnDYp5rvq4=
|
||||
github.com/adrg/strutil v0.3.0/go.mod h1:Jz0wzBVE6Uiy9wxo62YEqEY1Nwto3QlLl1Il5gkLKWU=
|
||||
github.com/adrg/sysfont v0.1.2 h1:MSU3KREM4RhsQ+7QgH7wPEPTgAgBIz0Hw6Nd4u7QgjE=
|
||||
github.com/adrg/sysfont v0.1.2/go.mod h1:6d3l7/BSjX9VaeXWJt9fcrftFaD/t7l11xgSywCPZGk=
|
||||
github.com/adrg/xdg v0.3.0 h1:BO+k4wFj0IoTolBF1Apn8oZrX3LQrEbBA8+/9vyW9J4=
|
||||
github.com/adrg/xdg v0.3.0/go.mod h1:7I2hH/IT30IsupOpKZ5ue7/qNi3CoKzD6tL3HwpaRMQ=
|
||||
github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls=
|
||||
github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E=
|
||||
github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY=
|
||||
github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0=
|
||||
github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao=
|
||||
github.com/bsm/ginkgo/v2 v2.7.0/go.mod h1:AiKlXPm7ItEHNc/2+OkrNG4E0ITzojb9/xWzvQ9XZ9w=
|
||||
github.com/bsm/ginkgo/v2 v2.9.5 h1:rtVBYPs3+TC5iLUVOis1B9tjLTup7Cj5IfzosKtvTJ0=
|
||||
github.com/bsm/ginkgo/v2 v2.9.5/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
|
||||
github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
|
||||
github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
|
||||
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
||||
github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM=
|
||||
github.com/bytedance/sonic v1.10.0 h1:qtNZduETEIWJVIyDl01BeNxur2rW9OwTQ/yBqFRkKEk=
|
||||
github.com/bytedance/sonic v1.10.0/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4=
|
||||
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
|
||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0=
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA=
|
||||
github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo=
|
||||
github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
|
||||
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
|
||||
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
|
||||
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
|
||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
|
||||
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/labstack/echo/v4 v4.10.2 h1:n1jAhnq/elIFTHr1EYpiYtyKgx4RW9ccVgkqByZaN2M=
|
||||
github.com/labstack/echo/v4 v4.10.2/go.mod h1:OEyqf2//K1DFdE57vw2DRgWY0M7s65IVQO2FzvI4J5k=
|
||||
github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4=
|
||||
github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ=
|
||||
github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8=
|
||||
github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
|
||||
github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc=
|
||||
|
@ -72,8 +58,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
|||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/redis/go-redis/v9 v9.0.5 h1:CuQcn5HIEeK7BgElubPP8CGtE0KakrnbBSTLjathl5o=
|
||||
github.com/redis/go-redis/v9 v9.0.5/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk=
|
||||
github.com/redis/go-redis/v9 v9.1.0 h1:137FnGdk+EQdCbye1FW+qOEcY5S+SpY9T0NiuqvtfMY=
|
||||
github.com/redis/go-redis/v9 v9.1.0/go.mod h1:urWj3He21Dj5k4TK1y59xH8Uj6ATueP8AH1cY3lZl4c=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
|
@ -82,19 +66,13 @@ github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc
|
|||
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
|
||||
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
|
||||
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE=
|
||||
github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||
|
@ -106,33 +84,30 @@ github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhw
|
|||
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
|
||||
github.com/wailsapp/wails/v2 v2.5.1 h1:mfG+2kWqQXYOwdgI43HEILjOZDXbk5woPYI3jP2b+js=
|
||||
github.com/wailsapp/wails/v2 v2.5.1/go.mod h1:jbOZbcr/zm79PxXxAjP8UoVlDd9wLW3uDs+isIthDfs=
|
||||
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
|
||||
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||
golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM=
|
||||
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=
|
||||
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
|
||||
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
|
||||
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
|
||||
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ=
|
||||
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8=
|
||||
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU=
|
||||
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
|
||||
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
|
||||
golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
|
||||
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58=
|
||||
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
|
||||
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
|
@ -141,5 +116,3 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C
|
|||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
|
|
Loading…
Reference in New Issue