diff --git a/go.mod b/go.mod index a74d481..0744006 100644 --- a/go.mod +++ b/go.mod @@ -12,6 +12,7 @@ require ( github.com/fumiama/go-hide-param v0.1.4 github.com/gabriel-vasile/mimetype v1.3.1 github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 + github.com/klauspost/compress v1.13.6 github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible github.com/mattn/go-colorable v0.1.8 github.com/pkg/errors v0.9.1 @@ -35,7 +36,6 @@ require ( github.com/google/uuid v1.1.1 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/jonboulle/clockwork v0.2.2 // indirect - github.com/klauspost/compress v1.10.3 // indirect github.com/klauspost/cpuid/v2 v2.0.6 // indirect github.com/lestrrat-go/strftime v1.0.5 // indirect github.com/maruel/rs v0.0.0-20150922171536-2c81c4312fe4 // indirect diff --git a/go.sum b/go.sum index 9b1e1a8..6078387 100644 --- a/go.sum +++ b/go.sum @@ -58,8 +58,9 @@ github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGn github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= -github.com/klauspost/compress v1.10.3 h1:OP96hzwJVBIHYU52pVTI6CczrxPvrGfgqF9N5eTO0Q8= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= diff --git a/internal/selfupdate/update_others.go b/internal/selfupdate/update_others.go index 73e370f..b18bb6b 100644 --- a/internal/selfupdate/update_others.go +++ b/internal/selfupdate/update_others.go @@ -6,12 +6,12 @@ package selfupdate import ( "archive/tar" "bytes" - "compress/gzip" "crypto/sha256" "errors" - "fmt" "io" "net/http" + + "github.com/klauspost/compress/gzip" ) // update go-cqhttp自我更新 @@ -43,7 +43,6 @@ func update(url string, sum []byte) error { } if header.Name == "go-cqhttp" { err, _ := fromStream(tr) - fmt.Println() if err != nil { return err } diff --git a/internal/selfupdate/update_windows.go b/internal/selfupdate/update_windows.go index d80bbc7..235b48f 100644 --- a/internal/selfupdate/update_windows.go +++ b/internal/selfupdate/update_windows.go @@ -1,13 +1,13 @@ package selfupdate import ( - "archive/zip" "bytes" "crypto/sha256" "errors" - "fmt" "io" "net/http" + + "github.com/klauspost/compress/zip" ) // update go-cqhttp自我更新 @@ -33,7 +33,6 @@ func update(url string, sum []byte) error { return err } err, _ = fromStream(file) - fmt.Println() if err != nil { return err }