From 2854b3dc3e6e3b90c27e674bc9515e9363c65cdc Mon Sep 17 00:00:00 2001 From: qydysky Date: Wed, 7 Aug 2024 01:50:49 +0800 Subject: [PATCH] Improve dep update --- F/api.go | 5 ++--- Reply/tts.go | 3 ++- go.mod | 3 +-- go.sum | 6 ++---- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/F/api.go b/F/api.go index d78c555..e6ac3ee 100644 --- a/F/api.go +++ b/F/api.go @@ -20,7 +20,6 @@ import ( "golang.org/x/exp/slices" _ "github.com/qydysky/biliApi" - p "github.com/qydysky/part" cmp "github.com/qydysky/part/component2" file "github.com/qydysky/part/file" funcCtrl "github.com/qydysky/part/funcCtrl" @@ -921,7 +920,7 @@ func (t *GetFunc) Get_cookie() (missKey []string) { } }() - if p.Checkfile().IsExist("cookie.txt") { //读取cookie文件 + if file.New("cookie.txt", 0, true).IsExist() { //读取cookie文件 if cookieString := string(CookieGet()); cookieString != `` { for k, v := range reqf.Cookies_String_2_Map(cookieString) { //cookie存入全局变量syncmap t.Cookie.Store(k, v) @@ -968,7 +967,7 @@ func (t *GetFunc) Get_cookie() (missKey []string) { } { //生成二维码 - if e := qr.WriteFile(img_url, qr.Medium, 256, `qr.png`); e != nil || !p.Checkfile().IsExist(`qr.png`) { + if e := qr.WriteFile(img_url, qr.Medium, 256, `qr.png`); e != nil || !file.New("qr.png", 0, true).IsExist() { apilog.L(`E: `, `qr error`) return } diff --git a/Reply/tts.go b/Reply/tts.go index 813045a..41baff6 100644 --- a/Reply/tts.go +++ b/Reply/tts.go @@ -19,6 +19,7 @@ import ( p "github.com/qydysky/part" file "github.com/qydysky/part/file" funcCtrl "github.com/qydysky/part/funcCtrl" + phash "github.com/qydysky/part/hash" limit "github.com/qydysky/part/limit" msgq "github.com/qydysky/part/msgq" reqf "github.com/qydysky/part/reqf" @@ -236,7 +237,7 @@ func youdao(msg string) error { } postS string ) - api[`sign`] = strings.ToUpper(p.Md5().Md5String(api[`youdaoappKey`] + api[`q`] + api[`salt`] + youdaoappKey)) + api[`sign`] = strings.ToUpper(phash.Md5String(api[`youdaoappKey`] + api[`q`] + api[`salt`] + youdaoappKey)) for k, v := range api { if postS != "" { postS += "&" diff --git a/go.mod b/go.mod index 5cc395a..0ddf721 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22.2 require ( github.com/gotk3/gotk3 v0.6.4 github.com/mdp/qrterminal/v3 v3.2.0 - github.com/qydysky/part v0.28.20240721124143 + github.com/qydysky/part v0.28.20240806174534 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 golang.org/x/text v0.16.0 @@ -48,7 +48,6 @@ require ( github.com/lib/pq v1.10.9 github.com/miekg/dns v1.1.61 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/thedevsaddam/gojsonq/v2 v2.5.2 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.8.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect diff --git a/go.sum b/go.sum index e97392a..bd88dd4 100644 --- a/go.sum +++ b/go.sum @@ -46,8 +46,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/qydysky/biliApi v0.0.0-20240725184407-15076dddb6fb h1:dtSpNF9hLQa09TUfR+xbYFkHcx2breAFsXeU7e599gE= github.com/qydysky/biliApi v0.0.0-20240725184407-15076dddb6fb/go.mod h1:om024vfxALQ5vxsbaGoMm8IS0esLYBnEOpJI8FsGoDg= -github.com/qydysky/part v0.28.20240721124143 h1:PX5BIhrrrnKN/VJFJSeg+qzdAPKb+N199vDtPjyNK5g= -github.com/qydysky/part v0.28.20240721124143/go.mod h1:dgagZnPYRFZDbt7XJf7nADOJLoYwlebD9B8Z8g5aHhI= +github.com/qydysky/part v0.28.20240806174534 h1:ouOgaLM0M2ByM9kDuZ8Tys/kIYAcPFdHy6iW332mI9U= +github.com/qydysky/part v0.28.20240806174534/go.mod h1:dgagZnPYRFZDbt7XJf7nADOJLoYwlebD9B8Z8g5aHhI= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= @@ -61,8 +61,6 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/thedevsaddam/gojsonq/v2 v2.5.2 h1:CoMVaYyKFsVj6TjU6APqAhAvC07hTI6IQen8PHzHYY0= -github.com/thedevsaddam/gojsonq/v2 v2.5.2/go.mod h1:bv6Xa7kWy82uT0LnXPE2SzGqTj33TAEeR560MdJkiXs= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= -- 2.39.2