diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5987f6324..43e8f9309 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ on: default: "false" env: - GO_VERSION: "1.22" + GO_VERSION: "1.23" FLUTTER_VERSION: "3.24.3" permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7f9546ca..02a4d025d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ on: - "Dockerfile" env: - GO_VERSION: "1.22" + GO_VERSION: "1.23" permissions: contents: write diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e993ca71..896cc1716 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ on: - "go.sum" env: - GO_VERSION: "1.22" + GO_VERSION: "1.23" FLUTTER_VERSION: "3.24.3" jobs: diff --git a/Dockerfile b/Dockerfile index a319072dc..1f83147cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.6 AS go +FROM golang:1.23.3 AS go WORKDIR /app COPY ./go.mod ./go.sum ./ RUN go mod download diff --git a/README.md b/README.md index e37993eb1..3b33582ce 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ This project is divided into two parts, the front end uses `flutter`, the back e ### Environment -1. Golang 1.22+ +1. Golang 1.23+ 2. Flutter 3.24+ ### Clone diff --git a/README_ja-JP.md b/README_ja-JP.md index b2a5c4a0d..5e0291336 100644 --- a/README_ja-JP.md +++ b/README_ja-JP.md @@ -102,7 +102,7 @@ Gopeed (正式名 Go Speed) は `Golang` + `Flutter` によって開発された ### 環境 -1. Go 言語 1.22+ +1. Go 言語 1.23+ 2. Flutter 3.24+ ### クローン diff --git a/README_vi-VN.md b/README_vi-VN.md index 72282a225..50f103d28 100644 --- a/README_vi-VN.md +++ b/README_vi-VN.md @@ -110,7 +110,7 @@ Dự án này được chia thành hai phần, phần giao diện sử dụng `f ### Environment -1. Golang 1.22+ +1. Golang 1.23+ 2. Flutter 3.24+ ### Clone diff --git a/README_zh-CN.md b/README_zh-CN.md index edee7c41b..decdc261b 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -114,7 +114,7 @@ Gopeed 还提供了浏览器扩展用于接管浏览器下载,支持 Chrome、 ### 环境要求 -1. Golang 1.22+ +1. Golang 1.23+ 2. Flutter 3.24+ ### 克隆项目 diff --git a/README_zh-TW.md b/README_zh-TW.md index bd8ef70c3..b8232eb41 100644 --- a/README_zh-TW.md +++ b/README_zh-TW.md @@ -110,7 +110,7 @@ go install github.com/GopeedLab/gopeed/cmd/gopeed@latest ### 開發環境 -1. Golang 1.22+ +1. Golang 1.23+ 2. Flutter 3.24+ ### 克隆項目 diff --git a/go.mod b/go.mod index 7d20a7dad..5f8220fc2 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/GopeedLab/gopeed -go 1.22 +go 1.23 require ( github.com/anacrolix/missinggo/v2 v2.7.3 @@ -16,7 +16,6 @@ require ( github.com/pkg/errors v0.9.1 github.com/rs/dnscache v0.0.0-20230804202142-fc85eb664529 github.com/rs/zerolog v1.31.0 - github.com/virtuald/go-paniclog v0.0.0-20190812204905-43a7fa316459 github.com/xiaoqidun/setft v0.0.0-20220310121541-be86327699ad go.etcd.io/bbolt v1.3.10 golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 diff --git a/go.sum b/go.sum index cdac34470..266bf7ef4 100644 --- a/go.sum +++ b/go.sum @@ -7,6 +7,8 @@ dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -125,8 +127,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo= github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dop251/goja v0.0.0-20240806095544-3491d4a58fbe h1:jwFJkgsdelB87ohlXaAGSd05Cb5ALDFa9iW9IGRHcRM= -github.com/dop251/goja v0.0.0-20240806095544-3491d4a58fbe/go.mod h1:DF+w/nLMIkvRpyhd/0K+Okbh3fVZBtXLwRtS/ccAa5w= github.com/dop251/goja v0.0.0-20240919115326-6c7d1df7ff05 h1:oK4+QcKsczZjHYTHD0JAdkvq5w74JEkG95J0XNBx/BI= github.com/dop251/goja v0.0.0-20240919115326-6c7d1df7ff05/go.mod h1:MxLav0peU43GgvwVgNbLAj1s/bSGboKkhuULvq/7hx4= github.com/dop251/goja_nodejs v0.0.0-20240728170619-29b559befffc h1:MKYt39yZJi0Z9xEeRmDX2L4ocE0ETKcHKw6MVL3R+co= @@ -214,8 +214,6 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/pprof v0.0.0-20240910150728-a0b0bb1d4134 h1:c5FlPPgxOn7kJz3VoPLkQYQXGBS3EklQ4Zfi57uOuqQ= github.com/google/pprof v0.0.0-20240910150728-a0b0bb1d4134/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -426,8 +424,6 @@ github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EU github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/virtuald/go-paniclog v0.0.0-20190812204905-43a7fa316459 h1:x9pIfbdIjnw+Ylb2vE27Gtqb7BDmfR+nLcJwvbJh98U= -github.com/virtuald/go-paniclog v0.0.0-20190812204905-43a7fa316459/go.mod h1:nFvuG3SWu3VWqobG3cX8nt57wXU0OOFapeCs/8axIuM= github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/wlynxg/anet v0.0.3 h1:PvR53psxFXstc12jelG6f1Lv4MWqE0tI76/hHGjh9rg= @@ -571,8 +567,6 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= diff --git a/pkg/download/downloader.go b/pkg/download/downloader.go index 337bc0993..da1ac217c 100644 --- a/pkg/download/downloader.go +++ b/pkg/download/downloader.go @@ -11,12 +11,12 @@ import ( gonanoid "github.com/matoous/go-nanoid/v2" "github.com/rs/zerolog" "github.com/rs/zerolog/pkgerrors" - "github.com/virtuald/go-paniclog" "math" gohttp "net/http" "net/url" "os" "path/filepath" + "runtime/debug" "sort" "strings" "sync" @@ -1130,7 +1130,7 @@ func logPanic(logDir string) { if err != nil { return } - paniclog.RedirectStderr(f) + debug.SetCrashOutput(f, debug.CrashOptions{}) } func (d *Downloader) buildFetcher(url string) (fetcher.Fetcher, error) {