chore(deps): update golangci/golangci-lint-action action to v7 #4

Merged
vbrandl merged 2 commits from renovate/golangci-golangci-lint-action-7.x into main 2025-04-09 14:49:33 +02:00
7 changed files with 20 additions and 10 deletions

View File

@ -15,6 +15,6 @@ jobs:
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v7
with:
version: 'latest'

View File

@ -15,7 +15,7 @@ const (
)
type Timing struct {
TimeMillis time.Duration `json:"timeMillis"`
ExecutionTime time.Duration `json:"executionTime"`
Source string `json:"source"`
}
@ -44,7 +44,7 @@ func (app *Application) HealthCheck(w http.ResponseWriter, r *http.Request) {
Timing: []Timing{
{
Source: "HealthCheck",
TimeMillis: time.Since(start),
ExecutionTime: time.Since(start),
},
},
Response: HealthCheckResponse{

View File

@ -1,6 +1,7 @@
package handlers_test
import (
"fmt"
"net/http"
"net/http/httptest"
"testing"
@ -35,7 +36,11 @@ func TestIndex(t *testing.T) {
app.Handler().ServeHTTP(w, req)
// app.Index(w, req)
res := w.Result()
defer res.Body.Close()
defer func() {
if err := res.Body.Close(); err != nil {
fmt.Println("Received error: ", err)
}
}()
if res.StatusCode != 200 {
t.Errorf("expected status to be 200, got %d", res.StatusCode)

View File

@ -1,6 +1,7 @@
package handlers_test
import (
"fmt"
"io"
"net/http"
"net/http/httptest"
@ -16,7 +17,11 @@ func TestNotFound(t *testing.T) {
app.Handler().ServeHTTP(w, req)
res := w.Result()
defer res.Body.Close()
defer func() {
if err := res.Body.Close(); err != nil {
fmt.Println("Received error: ", err)
}
}()
if res.StatusCode != 404 {
t.Errorf("expected status to be 404, got %d", res.StatusCode)