Skip to content

Commit

Permalink
Merge pull request #306 from invidian/update-linter
Browse files Browse the repository at this point in the history
Update golangci-lint to latest version v1.46.0
  • Loading branch information
invidian authored May 9, 2022
2 parents 323c462 + d9378e3 commit 3bdaabf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: golangci/golangci-lint:v1.45.1
container: golangci/golangci-lint:v1.46.0
steps:
- uses: actions/cache@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ linters:
- goerr113
# To be able to make use of Go zero-value feature.
- exhaustivestruct
- exhaustruct
# To allow defensive approach when initializing structs.
- ireturn
# This linter has been deprecated.
Expand All @@ -99,6 +100,7 @@ linters:
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- forbidigo
Expand Down Expand Up @@ -135,6 +137,8 @@ linters:
- nlreturn
- noctx
- nolintlint
- nonamedreturns
- nosprintfhostport
- paralleltest
- prealloc
- predeclared
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GORUN=$(GOCMD) run
GOBUILD=$(GOCMD) build -v -ldflags $(LD_FLAGS) -trimpath

CC_TEST_REPORTER_ID=6e107e510c5479f40b0ce9166a254f3f1ee0bc547b3e48281bada1a5a32bb56d
GOLANGCI_LINT_VERSION=v1.45.1
GOLANGCI_LINT_VERSION=v1.46.0
BIN_PATH=$$HOME/bin

GO_PACKAGES=./...
Expand Down
2 changes: 1 addition & 1 deletion e2e/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ func TestE2e(t *testing.T) {
Host: host,
})

etcdServers = append(etcdServers, fmt.Sprintf("https://%s:2379", controllerIP))
etcdServers = append(etcdServers, fmt.Sprintf("https://%s", net.JoinHostPort(controllerIP, "2379")))

controllerKubelets = append(controllerKubelets, kubelet.Kubelet{
Name: name,
Expand Down
3 changes: 2 additions & 1 deletion pkg/etcd/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/x509"
"encoding/pem"
"fmt"
"net"
"strings"

clientv3 "go.etcd.io/etcd/client/v3"
Expand Down Expand Up @@ -317,7 +318,7 @@ func (m *MemberConfig) Validate() error {

// peerURLs returns slice of peer urls assigned to member.
func (m *member) peerURLs() []string {
return []string{fmt.Sprintf("https://%s:2380", m.config.PeerAddress)}
return []string{fmt.Sprintf("https://%s", net.JoinHostPort(m.config.PeerAddress, "2380"))}
}

// forwardEndpoints opens forwarding connection for each endpoint
Expand Down

0 comments on commit 3bdaabf

Please sign in to comment.