fix(ci): fix lint errors and pin CI to Go 1.25

- Run gofmt on all files
- Export SetupUPnP to fix unused lint error
- Remove Go 1.26 from CI matrix (only test with 1.25)
This commit is contained in:
Deivid Soto 2026-03-31 22:15:12 +02:00
parent 3e0f3a5a64
commit d0dbfc3d12
10 changed files with 31 additions and 31 deletions

View file

@ -753,9 +753,9 @@ func TestIsSampleFile(t *testing.T) {
{"movie-sample-video.mkv", true},
{"movie_sample.mkv", true},
{"sample.mkv", true},
{"resampled.mkv", false}, // "sample" is part of "resampled"
{"resampled.mkv", false}, // "sample" is part of "resampled"
{"movie.mkv", false},
{"my.samples.zip", false}, // "sample" followed by 's' (alphanumeric)
{"my.samples.zip", false}, // "sample" followed by 's' (alphanumeric)
}
for _, tt := range tests {
if got := isSampleFile(tt.name); got != tt.want {
@ -880,15 +880,15 @@ func TestIsRarFile_Extended(t *testing.T) {
name string
want bool
}{
{"file.RAR", true}, // case insensitive
{"file.RAR", true}, // case insensitive
{"file.Rar", true},
{"file.s01", true},
{"file.s99", true},
{"file.002", true},
{"file.999", true},
{"file.r0", false}, // too short extension
{"file.rXX", false}, // non-numeric
{"file", false}, // no extension
{"file.r0", false}, // too short extension
{"file.rXX", false}, // non-numeric
{"file", false}, // no extension
{"file.mp4", false},
}
for _, tt := range tests {

View file

@ -14,12 +14,12 @@ func TestFindPar2File(t *testing.T) {
vol1 := filepath.Join(dir, "content.vol000+01.par2")
vol2 := filepath.Join(dir, "content.vol001+02.par2")
os.WriteFile(mainPar2, make([]byte, 100), 0o644) // smallest
os.WriteFile(mainPar2, make([]byte, 100), 0o644) // smallest
os.WriteFile(vol1, make([]byte, 10000), 0o644)
os.WriteFile(vol2, make([]byte, 50000), 0o644)
files := map[string]string{
"content.par2": mainPar2,
"content.par2": mainPar2,
"content.vol000+01.par2": vol1,
"content.vol001+02.par2": vol2,
}