Skip to content

Commit

Permalink
fixed linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rekby committed Aug 7, 2024
1 parent ae3c4fc commit 665848b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions examples/custom_env/custom_env_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build go1.18
// +build go1.18

package custom_env
package customenv

import (
"context"
Expand Down Expand Up @@ -40,7 +40,7 @@ func testServer(e fixenv.Env, response string) *httptest.Server {
f := func() (*fixenv.GenericResult[*httptest.Server], error) {
resp := []byte(response)

server := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
server := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, _ *http.Request) {
_, _ = writer.Write(resp)
}))
e.T().(testing.TB).Logf("Http server start. %q url: %q", response, server.URL)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build go1.18
// +build go1.18

package custom_env_with_shared_content
package customenv2

import (
"io"
Expand All @@ -28,7 +28,7 @@ func NewEnv(t *testing.T) *Env {

func testServer(e *Env) *httptest.Server {
f := func() (*fixenv.GenericResult[*httptest.Server], error) {
server := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
server := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, _ *http.Request) {
_, _ = writer.Write([]byte(e.Resp))
}))
e.T().(testing.TB).Logf("Http server start, url: %q", server.URL)
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/http_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func testServer(e fixenv.Env, response string) *httptest.Server {
f := func() (*fixenv.Result, error) {
resp := []byte(response)

server := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
server := httptest.NewServer(http.HandlerFunc(func(writer http.ResponseWriter, _ *http.Request) {
_, _ = writer.Write(resp)
}))
e.T().(testing.TB).Logf("Http server start. %q url: %q", response, server.URL)
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_main_test/example_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//go:build go1.18
// +build go1.18

package simple_main_test
package simple

import (
"github.com/rekby/fixenv"
"math/rand"
"testing"
)

var global int = -1
var global = -1

func FSingleRandom(e fixenv.Env) int {
var f fixenv.GenericFixtureFunction[int] = func() (*fixenv.GenericResult[int], error) {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_main_test/testmain_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package simple_main
package simple

import (
"github.com/rekby/fixenv"
Expand Down

0 comments on commit 665848b

Please sign in to comment.