Skip to content

Commit

Permalink
update lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
guumaster committed May 2, 2023
1 parent 2cf00b4 commit 911d975
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ linters:
- misspell
- nakedret
- noctx
- nolintlint
# - nolintlint
- rowserrcheck
- scopelint
- staticcheck
Expand Down
2 changes: 1 addition & 1 deletion cmd/hostctl/actions/post_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func postActionCmd(cmd *cobra.Command, args []string, postCmd *cobra.Command, li

func waitSignalOrDuration(d time.Duration) <-chan struct{} {
done := make(chan struct{})
sig := make(chan os.Signal)
sig := make(chan os.Signal, 1)

if d < 0 {
d = -d
Expand Down
2 changes: 1 addition & 1 deletion cmd/hostctl/actions/sync_docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func newClientWithResponse(t *testing.T, resp map[string]string) *client.Client
t.Helper()

v := "1.22"
c, err := client.NewClient("tcp://fake:2345", v,
c, err := client.NewClient("tcp://fake:2345", v, //nolint: staticcheck
&http.Client{
Transport: transportFunc(func(req *http.Request) (*http.Response, error) {
url := req.URL.Path
Expand Down
4 changes: 2 additions & 2 deletions pkg/docker/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func newClientWithResponse(t *testing.T, resp map[string]string) *client.Client
t.Helper()

v := "1.22"
c, err := client.NewClient("tcp://fake:2345", v,
c, err := client.NewClient("tcp://fake:2345", v, //nolint: staticcheck
&http.Client{
Transport: transportFunc(func(req *http.Request) (*http.Response, error) {
url := req.URL.Path
Expand All @@ -116,7 +116,7 @@ func newClientWithResponse(t *testing.T, resp map[string]string) *client.Client
}, nil
}),
},
map[string]string{})
map[string]string{}) //nolint: staticcheck

assert.NoError(t, err)

Expand Down
2 changes: 1 addition & 1 deletion pkg/parser/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func newClientWithResponse(t *testing.T, resp map[string]string) *client.Client
t.Helper()

v := "1.22"
c, err := client.NewClient("tcp://fake:2345", v,
c, err := client.NewClient("tcp://fake:2345", v, //nolint: staticcheck
&http.Client{
Transport: transportFunc(func(req *http.Request) (*http.Response, error) {
url := req.URL.Path
Expand Down
2 changes: 1 addition & 1 deletion pkg/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func parseRouteLine(str string) (*types.Route, bool) {
if len(clean) == 0 {
return nil, false
}

result := endingComment.FindStringSubmatch(clean)
tResult := strings.TrimSpace(result[1])
p := strings.Split(tResult, " ")
Expand Down

0 comments on commit 911d975

Please sign in to comment.