Skip to content

Commit 759e1a8

Browse files
Merge pull request #95614 from wilsonehusin/golint-client-go-transport
Fix golint failures in client-go/transport Kubernetes-commit: 3b2746c9ea9e0fa247b01dca27634e509b385eda
2 parents 30548ac + d6281e9 commit 759e1a8

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

Godeps/Godeps.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ require (
2626
golang.org/x/net v0.0.0-20200707034311-ab3426394381
2727
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6
2828
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
29-
k8s.io/api v0.0.0-20201112122247-88ad409c1fcc
30-
k8s.io/apimachinery v0.0.0-20201112162105-000b5f4f8623
29+
k8s.io/api v0.0.0-20201113002300-9e320febc26e
30+
k8s.io/apimachinery v0.0.0-20201113023623-671277bf9349
3131
k8s.io/klog/v2 v2.4.0
3232
k8s.io/utils v0.0.0-20201104234853-8146046b121e
3333
sigs.k8s.io/yaml v1.2.0
3434
)
3535

3636
replace (
37-
k8s.io/api => k8s.io/api v0.0.0-20201112122247-88ad409c1fcc
38-
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20201112162105-000b5f4f8623
37+
k8s.io/api => k8s.io/api v0.0.0-20201113002300-9e320febc26e
38+
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20201113023623-671277bf9349
3939
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
347347
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
348348
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
349349
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
350-
k8s.io/api v0.0.0-20201112122247-88ad409c1fcc/go.mod h1:kdpOjtJg1fLz8kIoeBe0Ohm3dngnl37spUZUciyX7Ho=
351-
k8s.io/apimachinery v0.0.0-20201112162105-000b5f4f8623/go.mod h1:C4HVOTZCaKwcNDaxwQoXe3Zk6BLT5jNivqfdcniEtuY=
350+
k8s.io/api v0.0.0-20201113002300-9e320febc26e/go.mod h1:XraaYPIr83qvGlL2a/ejmFGq+OziqYEy9CJ8AWtXnpc=
351+
k8s.io/apimachinery v0.0.0-20201113023623-671277bf9349/go.mod h1:C4HVOTZCaKwcNDaxwQoXe3Zk6BLT5jNivqfdcniEtuY=
352352
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
353353
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
354354
k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ=

transport/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (c *Config) HasCertAuth() bool {
108108
return (len(c.TLS.CertData) != 0 || len(c.TLS.CertFile) != 0) && (len(c.TLS.KeyData) != 0 || len(c.TLS.KeyFile) != 0)
109109
}
110110

111-
// HasCertCallbacks returns whether the configuration has certificate callback or not.
111+
// HasCertCallback returns whether the configuration has certificate callback or not.
112112
func (c *Config) HasCertCallback() bool {
113113
return c.TLS.GetCert != nil
114114
}

transport/round_trippers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ type userAgentRoundTripper struct {
146146
rt http.RoundTripper
147147
}
148148

149+
// NewUserAgentRoundTripper will add User-Agent header to a request unless it has already been set.
149150
func NewUserAgentRoundTripper(agent string, rt http.RoundTripper) http.RoundTripper {
150151
return &userAgentRoundTripper{agent, rt}
151152
}
@@ -260,7 +261,7 @@ func NewBearerAuthRoundTripper(bearer string, rt http.RoundTripper) http.RoundTr
260261
return &bearerAuthRoundTripper{bearer, nil, rt}
261262
}
262263

263-
// NewBearerAuthRoundTripper adds the provided bearer token to a request
264+
// NewBearerAuthWithRefreshRoundTripper adds the provided bearer token to a request
264265
// unless the authorization header has already been set.
265266
// If tokenFile is non-empty, it is periodically read,
266267
// and the last successfully read content is used as the bearer token.

0 commit comments

Comments
 (0)