Skip to content

Commit

Permalink
update golangci
Browse files Browse the repository at this point in the history
  • Loading branch information
simonfuhrer committed Nov 17, 2022
1 parent fd1e2f1 commit 731d5cc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
5 changes: 0 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,18 @@ output:

linters:
enable:
- deadcode
- errcheck
- goconst
- goimports
- gosimple
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
- gofmt
- govet
- unconvert
- maligned
- gocritic
- bodyclose
- scopelint
- nakedret
- stylecheck
5 changes: 2 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/http/httputil"
Expand Down Expand Up @@ -212,7 +211,7 @@ func checkResponse(r *http.Response) error {
return nil
}

buf, err := ioutil.ReadAll(r.Body)
buf, err := io.ReadAll(r.Body)
if err != nil {
return err
}
Expand All @@ -221,7 +220,7 @@ func checkResponse(r *http.Response) error {
return fmt.Errorf("statusCode: %d, response: %s", r.StatusCode, string(buf))
}

data := ioutil.NopCloser(bytes.NewBuffer(buf))
data := io.NopCloser(bytes.NewBuffer(buf))

r.Body = data

Expand Down
6 changes: 3 additions & 3 deletions schema/routing_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type NetworkAddress struct {

// RoutingPolicyAction Action
//
// Routing policy action
// # Routing policy action
//
// swagger:model routing_policy_action
type RoutingPolicyAction struct {
Expand All @@ -97,7 +97,7 @@ type RoutingPolicyAction struct {

// ProtocolParameters IP protocol
//
// Routing policy IP protocol parameters
// # Routing policy IP protocol parameters
//
// swagger:model protocol_parameters
type ProtocolParameters struct {
Expand Down Expand Up @@ -137,7 +137,7 @@ type Icmp struct {

// UDP UDP parameters
//
// UDP parameters to be matched in routing policy
// # UDP parameters to be matched in routing policy
//
// swagger:model udp
type UDP struct {
Expand Down
2 changes: 1 addition & 1 deletion schema/vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ type VpcDefStatus struct {

// VpcResourcesDefStatus VPC resources status
//
// VPC resources status
// # VPC resources status
//
// swagger:model vpc_resources_def_status
type VpcResourcesDefStatus struct {
Expand Down

0 comments on commit 731d5cc

Please sign in to comment.