Skip to content

Commit

Permalink
all: more linting
Browse files Browse the repository at this point in the history
  • Loading branch information
leonklingele committed May 18, 2023
1 parent b8bbdd4 commit 50af4d2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ linters:
- tagliatelle
- tenv
- testableexamples
# - testpackage # TODO: Enable once https://github.com/gofiber/fiber/issues/2252 is implemente
# - testpackage # TODO: Enable once https://github.com/gofiber/fiber/issues/2252 is implemented
- thelper
- tparallel
- typecheck
Expand Down
2 changes: 1 addition & 1 deletion helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/valyala/fasthttp"
)

// Guards overwrites to os.Stdout and Os.Stderr
// Guards overwrites to os.Stdout and os.Stderr
var osStdVarMu sync.RWMutex

// getTLSConfig returns a net listener's tls config
Expand Down
1 change: 1 addition & 0 deletions middleware/idempotency/response.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package idempotency

//go:generate msgp -o=response_msgp.go -io=false -unexported
type response struct {
StatusCode int `msg:"sc"`

Expand Down
13 changes: 3 additions & 10 deletions prefork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ func Test_App_Prefork_Child_Process(t *testing.T) {
// Reset test var
testPreforkMaster = true

utils.AssertEqual(t, nil, os.Setenv(envPreforkChildKey, envPreforkChildVal))
t.Cleanup(func() {
utils.AssertEqual(t, nil, os.Setenv(envPreforkChildKey, ""))
})
t.Setenv(envPreforkChildKey, envPreforkChildVal)

app := New()

Expand Down Expand Up @@ -74,13 +71,9 @@ func Test_App_Prefork_Master_Process(t *testing.T) {
dummyChildCmd.Store("")
}

//nolint:paralleltest // Test is using t.Setenv which can't be run in parallel
func Test_App_Prefork_Child_Process_Never_Show_Startup_Message(t *testing.T) {
t.Parallel()

utils.AssertEqual(t, nil, os.Setenv(envPreforkChildKey, envPreforkChildVal))
t.Cleanup(func() {
utils.AssertEqual(t, nil, os.Setenv(envPreforkChildKey, ""))
})
t.Setenv(envPreforkChildKey, envPreforkChildVal)

rescueStdout := os.Stdout
defer func() { os.Stdout = rescueStdout }() //nolint:reassign // Must do this inside the test
Expand Down

0 comments on commit 50af4d2

Please sign in to comment.