From 731d5cc8a1b216518c28f4d8a424e2ee64e84f68 Mon Sep 17 00:00:00 2001 From: Simon Fuhrer Date: Thu, 17 Nov 2022 20:52:22 +0100 Subject: [PATCH] update golangci --- .golangci.yml | 5 ----- client.go | 5 ++--- schema/routing_policy.go | 6 +++--- schema/vpc.go | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index faa94c4..8e6d328 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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 diff --git a/client.go b/client.go index a106632..a869702 100644 --- a/client.go +++ b/client.go @@ -7,7 +7,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net" "net/http" "net/http/httputil" @@ -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 } @@ -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 diff --git a/schema/routing_policy.go b/schema/routing_policy.go index 848c51c..c229d31 100644 --- a/schema/routing_policy.go +++ b/schema/routing_policy.go @@ -82,7 +82,7 @@ type NetworkAddress struct { // RoutingPolicyAction Action // -// Routing policy action +// # Routing policy action // // swagger:model routing_policy_action type RoutingPolicyAction struct { @@ -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 { @@ -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 { diff --git a/schema/vpc.go b/schema/vpc.go index efbcfd4..c735abf 100644 --- a/schema/vpc.go +++ b/schema/vpc.go @@ -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 {