chore(golangci-lint): bump golangci-lint to v2.10.1

This commit is contained in:
Julien Neuhart
2026-02-21 17:54:46 +01:00
parent be78a71bb7
commit 57e1b7efda
9 changed files with 17 additions and 15 deletions

View File

@@ -20,6 +20,7 @@ func doRequest(method, url string, headers map[string]string, body io.Reader) (*
req.Header.Set(header, value)
}
// #nosec
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, fmt.Errorf("send a request: %w", err)
@@ -74,6 +75,7 @@ func doFormDataRequest(method, url string, fields map[string]string, files map[s
}
req.Header.Set("Content-Type", writer.FormDataContentType())
// #nosec
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, fmt.Errorf("send a request: %w", err)

View File

@@ -79,12 +79,14 @@ func newServer(ctx context.Context, workdir string) (*server, error) {
}
dirPath := fmt.Sprintf("%s/%s", workdir, s.req.Header.Get("Gotenberg-Trace"))
// #nosec
err = os.MkdirAll(dirPath, 0o755)
if err != nil {
return webhookErr(fmt.Errorf("create working directory: %w", err))
}
fpath := fmt.Sprintf("%s/%s", dirPath, filename)
// #nosec
file, err := os.Create(fpath)
if err != nil {
return webhookErr(fmt.Errorf("create file %q: %w", fpath, err))