Skip to content

Commit 602fc25

Browse files
committed
fix: upgrade deps and medernize codes
1 parent af28738 commit 602fc25

File tree

4 files changed

+114
-123
lines changed

4 files changed

+114
-123
lines changed

api/handlers_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ func TestConcurrentProgressStore(t *testing.T) {
358358
numGoroutines := 100
359359

360360
// Concurrent registrations
361-
for i := 0; i < numGoroutines; i++ {
361+
for i := range numGoroutines {
362362
wg.Add(1)
363363
go func(id int) {
364364
defer wg.Done()
@@ -368,7 +368,7 @@ func TestConcurrentProgressStore(t *testing.T) {
368368
}
369369

370370
// Concurrent reads
371-
for i := 0; i < numGoroutines; i++ {
371+
for i := range numGoroutines {
372372
wg.Add(1)
373373
go func(id int) {
374374
defer wg.Done()
@@ -378,7 +378,7 @@ func TestConcurrentProgressStore(t *testing.T) {
378378
}
379379

380380
// Concurrent updates
381-
for i := 0; i < numGoroutines; i++ {
381+
for i := range numGoroutines {
382382
wg.Add(1)
383383
go func(id int) {
384384
defer wg.Done()
@@ -393,7 +393,7 @@ func TestConcurrentProgressStore(t *testing.T) {
393393
wg.Wait()
394394

395395
// Verify all tasks exist
396-
for i := 0; i < numGoroutines; i++ {
396+
for i := range numGoroutines {
397397
taskID := fmt.Sprintf("concurrent-test-%d", i)
398398
if _, ok := GetTask(taskID); !ok {
399399
t.Errorf("task %s not found after concurrent operations", taskID)
@@ -411,11 +411,11 @@ func TestProgressTrackerConcurrentUpdates(t *testing.T) {
411411
updatesPerGoroutine := 100
412412

413413
// Concurrent progress updates
414-
for i := 0; i < numGoroutines; i++ {
414+
for i := range numGoroutines {
415415
wg.Add(1)
416416
go func(id int) {
417417
defer wg.Done()
418-
for j := 0; j < updatesPerGoroutine; j++ {
418+
for j := range updatesPerGoroutine {
419419
tracker.OnProgress(int64(id*updatesPerGoroutine+j), j)
420420
}
421421
}(i)
@@ -594,7 +594,7 @@ func TestGetTaskTypesHandler(t *testing.T) {
594594
}
595595

596596
if tt.method == http.MethodGet {
597-
var resp map[string]interface{}
597+
var resp map[string]any
598598
if err := json.Unmarshal(rr.Body.Bytes(), &resp); err != nil {
599599
t.Errorf("failed to unmarshal response: %v", err)
600600
}

go.mod

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,49 @@
11
module github.com/krau/SaveAny-Bot
22

3-
go 1.24.2
3+
go 1.25.0
44

55
require (
66
github.com/blang/semver v3.5.1+incompatible
77
github.com/celestix/gotgproto v1.0.0-beta22
88
github.com/cenkalti/backoff/v4 v4.3.0
9-
github.com/charmbracelet/bubbles v0.21.0
9+
github.com/charmbracelet/bubbles v1.0.0
1010
github.com/charmbracelet/bubbletea v1.3.10
1111
github.com/charmbracelet/lipgloss v1.1.0
1212
github.com/charmbracelet/log v0.4.2
1313
github.com/dustin/go-humanize v1.0.1
14-
github.com/gabriel-vasile/mimetype v1.4.12
14+
github.com/gabriel-vasile/mimetype v1.4.13
1515
github.com/goccy/go-yaml v1.19.2
1616
github.com/gotd/contrib v0.21.1
17-
github.com/gotd/td v0.137.0
17+
github.com/gotd/td v0.140.0
1818
github.com/johannesboyne/gofakes3 v0.0.0-20250916175020-ebf3e50324d3
1919
github.com/krau/ffmpeg-go v0.6.0
20-
github.com/lrstanley/go-ytdlp v1.2.7
20+
github.com/lrstanley/go-ytdlp v1.3.2
2121
github.com/minio/minio-go/v7 v7.0.98
22-
github.com/playwright-community/playwright-go v0.5200.1
22+
github.com/playwright-community/playwright-go v0.5700.1
2323
github.com/rs/xid v1.6.0
2424
github.com/spf13/cobra v1.10.2
2525
github.com/spf13/viper v1.21.0
2626
github.com/unvgo/ghselfupdate v1.0.1
2727
github.com/yapingcat/gomedia v0.0.0-20240906162731-17feea57090c
28-
golang.org/x/net v0.49.0
29-
golang.org/x/term v0.39.0
28+
golang.org/x/net v0.51.0
29+
golang.org/x/term v0.40.0
3030
golang.org/x/time v0.14.0
3131
)
3232

3333
require (
3434
github.com/AnimeKaizoku/cacher v1.0.3 // indirect
35-
github.com/ProtonMail/go-crypto v1.3.0 // indirect
35+
github.com/ProtonMail/go-crypto v1.4.0 // indirect
3636
github.com/aws/smithy-go v1.24.0 // indirect
3737
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
3838
github.com/cespare/xxhash/v2 v2.3.0 // indirect
39-
github.com/charmbracelet/colorprofile v0.4.1 // indirect
39+
github.com/charmbracelet/colorprofile v0.4.2 // indirect
4040
github.com/charmbracelet/harmonica v0.2.0 // indirect
41-
github.com/charmbracelet/x/ansi v0.11.4 // indirect
42-
github.com/charmbracelet/x/cellbuf v0.0.14 // indirect
41+
github.com/charmbracelet/x/ansi v0.11.6 // indirect
42+
github.com/charmbracelet/x/cellbuf v0.0.15 // indirect
4343
github.com/charmbracelet/x/term v0.2.2 // indirect
44-
github.com/clipperhouse/displaywidth v0.7.0 // indirect
45-
github.com/clipperhouse/stringish v0.1.1 // indirect
46-
github.com/clipperhouse/uax29/v2 v2.3.0 // indirect
47-
github.com/cloudflare/circl v1.6.1 // indirect
44+
github.com/clipperhouse/displaywidth v0.11.0 // indirect
45+
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
46+
github.com/cloudflare/circl v1.6.3 // indirect
4847
github.com/coder/websocket v1.8.14 // indirect
4948
github.com/deckarep/golang-set/v2 v2.8.0 // indirect
5049
github.com/dlclark/regexp2 v1.11.5 // indirect
@@ -64,7 +63,7 @@ require (
6463
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
6564
github.com/google/go-github/v30 v30.1.0 // indirect
6665
github.com/google/go-querystring v1.2.0 // indirect
67-
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect
66+
github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc // indirect
6867
github.com/google/uuid v1.6.0 // indirect
6968
github.com/gotd/ige v0.2.2 // indirect
7069
github.com/gotd/neo v0.1.5 // indirect
@@ -77,15 +76,15 @@ require (
7776
github.com/mattn/go-colorable v0.1.14 // indirect
7877
github.com/mattn/go-isatty v0.0.20 // indirect
7978
github.com/mattn/go-localereader v0.0.1 // indirect
80-
github.com/mattn/go-runewidth v0.0.19 // indirect
79+
github.com/mattn/go-runewidth v0.0.20 // indirect
8180
github.com/minio/crc64nvme v1.1.1 // indirect
8281
github.com/minio/md5-simd v1.1.2 // indirect
8382
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
8483
github.com/muesli/cancelreader v0.2.2 // indirect
8584
github.com/muesli/termenv v0.16.0 // indirect
8685
github.com/ncruces/go-strftime v1.0.0 // indirect
8786
github.com/ncruces/julianday v1.0.0 // indirect
88-
github.com/ogen-go/ogen v1.18.0 // indirect
87+
github.com/ogen-go/ogen v1.20.1 // indirect
8988
github.com/philhofer/fwd v1.2.0 // indirect
9089
github.com/pkg/errors v0.9.1 // indirect
9190
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
@@ -96,34 +95,34 @@ require (
9695
github.com/tetratelabs/wazero v1.11.0 // indirect
9796
github.com/tinylib/msgp v1.6.3 // indirect
9897
github.com/ulikunitz/xz v0.5.15 // indirect
99-
go.opentelemetry.io/otel v1.39.0 // indirect
100-
go.opentelemetry.io/otel/metric v1.39.0 // indirect
101-
go.opentelemetry.io/otel/trace v1.39.0 // indirect
98+
go.opentelemetry.io/otel v1.41.0 // indirect
99+
go.opentelemetry.io/otel/metric v1.41.0 // indirect
100+
go.opentelemetry.io/otel/trace v1.41.0 // indirect
102101
go.shabbyrobe.org/gocovmerge v0.0.0-20230507111327-fa4f82cfbf4d // indirect
103102
go.uber.org/atomic v1.11.0 // indirect
104103
go.uber.org/zap v1.27.1 // indirect
105104
go.yaml.in/yaml/v3 v3.0.4 // indirect
106-
golang.org/x/crypto v0.47.0 // indirect
107-
golang.org/x/mod v0.32.0 // indirect
108-
golang.org/x/tools v0.41.0 // indirect
105+
golang.org/x/crypto v0.48.0 // indirect
106+
golang.org/x/mod v0.33.0 // indirect
107+
golang.org/x/tools v0.42.0 // indirect
109108
gopkg.in/yaml.v2 v2.4.0 // indirect
110-
modernc.org/libc v1.67.6 // indirect
109+
modernc.org/libc v1.69.0 // indirect
111110
modernc.org/mathutil v1.7.1 // indirect
112111
modernc.org/memory v1.11.0 // indirect
113-
modernc.org/sqlite v1.44.1 // indirect
112+
modernc.org/sqlite v1.46.1 // indirect
114113
rsc.io/qr v0.2.0 // indirect
115114
)
116115

117116
require (
118-
github.com/dgraph-io/ristretto/v2 v2.3.0
119-
github.com/dop251/goja v0.0.0-20260106131823-651366fbe6e3
117+
github.com/dgraph-io/ristretto/v2 v2.4.0
118+
github.com/dop251/goja v0.0.0-20260226184354-913bd86fb70c
120119
github.com/duke-git/lancet/v2 v2.3.8
121120
github.com/fsnotify/fsnotify v1.9.0 // indirect
122121
github.com/glebarez/sqlite v1.11.0
123122
github.com/inconshreveable/mousetrap v1.1.0 // indirect
124-
github.com/klauspost/compress v1.18.3 // indirect
123+
github.com/klauspost/compress v1.18.4 // indirect
125124
github.com/mitchellh/mapstructure v1.5.0
126-
github.com/ncruces/go-sqlite3 v0.30.4
125+
github.com/ncruces/go-sqlite3 v0.30.5
127126
github.com/ncruces/go-sqlite3/gormlite v0.30.2
128127
github.com/nicksnyder/go-i18n/v2 v2.6.1
129128
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
@@ -134,9 +133,9 @@ require (
134133
github.com/subosito/gotenv v1.6.0 // indirect
135134
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
136135
go.uber.org/multierr v1.11.0 // indirect
137-
golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect
136+
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa // indirect
138137
golang.org/x/sync v0.19.0
139-
golang.org/x/sys v0.40.0 // indirect
140-
golang.org/x/text v0.33.0
138+
golang.org/x/sys v0.41.0 // indirect
139+
golang.org/x/text v0.34.0
141140
gorm.io/gorm v1.31.1
142141
)

0 commit comments

Comments
 (0)