mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-14 21:43:27 +00:00
Update gofmt for go1.11
Kubernetes-commit: 97b2992dc191a357e2167eff5035ce26237a4799
This commit is contained in:
parent
9c81604894
commit
7f1c01699a
2
tools/cache/shared_informer.go
vendored
2
tools/cache/shared_informer.go
vendored
@ -86,7 +86,7 @@ func NewSharedIndexInformer(lw ListerWatcher, objType runtime.Object, defaultEve
|
|||||||
resyncCheckPeriod: defaultEventHandlerResyncPeriod,
|
resyncCheckPeriod: defaultEventHandlerResyncPeriod,
|
||||||
defaultEventHandlerResyncPeriod: defaultEventHandlerResyncPeriod,
|
defaultEventHandlerResyncPeriod: defaultEventHandlerResyncPeriod,
|
||||||
cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", objType)),
|
cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", objType)),
|
||||||
clock: realClock,
|
clock: realClock,
|
||||||
}
|
}
|
||||||
return sharedIndexInformer
|
return sharedIndexInformer
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ func TestCertificateData(t *testing.T) {
|
|||||||
|
|
||||||
config := clientcmdapi.NewConfig()
|
config := clientcmdapi.NewConfig()
|
||||||
config.Clusters["clean"] = &clientcmdapi.Cluster{
|
config.Clusters["clean"] = &clientcmdapi.Cluster{
|
||||||
Server: "https://localhost:8443",
|
Server: "https://localhost:8443",
|
||||||
CertificateAuthorityData: caData,
|
CertificateAuthorityData: caData,
|
||||||
}
|
}
|
||||||
config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{
|
config.AuthInfos["clean"] = &clientcmdapi.AuthInfo{
|
||||||
|
@ -135,7 +135,7 @@ func TestImpersonationRoundTripper(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
expected: map[string][]string{
|
expected: map[string][]string{
|
||||||
ImpersonateUserHeader: {"user"},
|
ImpersonateUserHeader: {"user"},
|
||||||
ImpersonateUserExtraHeaderPrefix + `Test.example.com%2fthing.thing`: {"A", "a"},
|
ImpersonateUserExtraHeaderPrefix + `Test.example.com%2fthing.thing`: {"A", "a"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -219,11 +219,11 @@ func TestAuthProxyRoundTripper(t *testing.T) {
|
|||||||
username: "user",
|
username: "user",
|
||||||
groups: []string{"groupA", "groupB"},
|
groups: []string{"groupA", "groupB"},
|
||||||
extra: map[string][]string{
|
extra: map[string][]string{
|
||||||
"one": {"alpha", "bravo"},
|
"one": {"alpha", "bravo"},
|
||||||
"example.com/two%20three": {"charlie", "delta"},
|
"example.com/two%20three": {"charlie", "delta"},
|
||||||
},
|
},
|
||||||
expectedExtra: map[string][]string{
|
expectedExtra: map[string][]string{
|
||||||
"one": {"alpha", "bravo"},
|
"one": {"alpha", "bravo"},
|
||||||
"example.com%2ftwo%2520three": {"charlie", "delta"},
|
"example.com%2ftwo%2520three": {"charlie", "delta"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -77,7 +77,7 @@ func NewSelfSignedCACert(cfg Config, key crypto.Signer) (*x509.Certificate, erro
|
|||||||
NotAfter: now.Add(duration365d * 10).UTC(),
|
NotAfter: now.Add(duration365d * 10).UTC(),
|
||||||
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
|
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
|
||||||
BasicConstraintsValid: true,
|
BasicConstraintsValid: true,
|
||||||
IsCA: true,
|
IsCA: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &tmpl, &tmpl, key.Public(), key)
|
certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &tmpl, &tmpl, key.Public(), key)
|
||||||
@ -188,7 +188,7 @@ func GenerateSelfSignedCertKeyWithFixtures(host string, alternateIPs []net.IP, a
|
|||||||
|
|
||||||
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
|
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
|
||||||
BasicConstraintsValid: true,
|
BasicConstraintsValid: true,
|
||||||
IsCA: true,
|
IsCA: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
caDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &caTemplate, &caTemplate, &caKey.PublicKey, caKey)
|
caDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &caTemplate, &caTemplate, &caKey.PublicKey, caKey)
|
||||||
|
Loading…
Reference in New Issue
Block a user