go1.24: fix lint, unit and system tests

- development env: base on debian trixie with go1.24
- lint: run with default config
- fix lint errors
- fix unit tests
- fix system test
This commit is contained in:
André Roth
2025-04-12 17:53:48 +02:00
parent ae5379d84a
commit f7057a9517
117 changed files with 803 additions and 727 deletions
+5 -5
View File
@@ -32,13 +32,13 @@ func (s *DownloaderSuiteBase) SetUpTest(c *C) {
mux := http.NewServeMux()
mux.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, %s", r.URL.Path)
_, _ = fmt.Fprintf(w, "Hello, %s", r.URL.Path)
})
s.ch = make(chan struct{})
go func() {
http.Serve(s.l, mux)
_ = http.Serve(s.l, mux)
close(s.ch)
}()
@@ -52,11 +52,11 @@ func (s *DownloaderSuiteBase) SetUpTest(c *C) {
func (s *DownloaderSuiteBase) TearDownTest(c *C) {
s.progress.Shutdown()
s.l.Close()
_ = s.l.Close()
<-s.ch
os.Remove(s.tempfile.Name())
s.tempfile.Close()
_ = os.Remove(s.tempfile.Name())
_ = s.tempfile.Close()
}
type DownloaderSuite struct {