mirror of https://github.com/k3s-io/k3s
Merge pull request #74510 from SataQiu/fix-golint-2019022502
Fix some golint failures for pkg/kubelet/apis/...pull/564/head
commit
752d18d2b0
|
@ -71,7 +71,6 @@ pkg/capabilities
|
|||
pkg/cloudprovider/providers/fake
|
||||
pkg/cloudprovider/providers/photon
|
||||
pkg/cloudprovider/providers/vsphere
|
||||
pkg/cloudprovider/providers/vsphere/vclib
|
||||
pkg/controller
|
||||
pkg/controller/apis/config/v1alpha1
|
||||
pkg/controller/bootstrap
|
||||
|
@ -161,10 +160,7 @@ pkg/kubelet/apis
|
|||
pkg/kubelet/apis/config
|
||||
pkg/kubelet/apis/config/v1beta1
|
||||
pkg/kubelet/apis/cri/testing
|
||||
pkg/kubelet/apis/deviceplugin/v1alpha
|
||||
pkg/kubelet/apis/deviceplugin/v1beta1
|
||||
pkg/kubelet/apis/pluginregistration/v1alpha1
|
||||
pkg/kubelet/apis/pluginregistration/v1beta1
|
||||
pkg/kubelet/cadvisor
|
||||
pkg/kubelet/cadvisor/testing
|
||||
pkg/kubelet/checkpoint
|
||||
|
|
|
@ -85,7 +85,7 @@ func TestWithValidCaCert(t *testing.T) {
|
|||
|
||||
server, _ := createTestServer(t, fixtures.CaCertPath, fixtures.ServerCertPath, fixtures.ServerKeyPath, handler)
|
||||
server.StartTLS()
|
||||
u := mustParseUrl(t, server.URL)
|
||||
u := mustParseURL(t, server.URL)
|
||||
|
||||
connection := &vclib.VSphereConnection{
|
||||
Hostname: u.Hostname(),
|
||||
|
@ -104,7 +104,7 @@ func TestWithVerificationWithWrongThumbprint(t *testing.T) {
|
|||
|
||||
server, _ := createTestServer(t, fixtures.CaCertPath, fixtures.ServerCertPath, fixtures.ServerKeyPath, handler)
|
||||
server.StartTLS()
|
||||
u := mustParseUrl(t, server.URL)
|
||||
u := mustParseURL(t, server.URL)
|
||||
|
||||
connection := &vclib.VSphereConnection{
|
||||
Hostname: u.Hostname(),
|
||||
|
@ -124,7 +124,7 @@ func TestWithVerificationWithoutCaCertOrThumbprint(t *testing.T) {
|
|||
|
||||
server, _ := createTestServer(t, fixtures.CaCertPath, fixtures.ServerCertPath, fixtures.ServerKeyPath, handler)
|
||||
server.StartTLS()
|
||||
u := mustParseUrl(t, server.URL)
|
||||
u := mustParseURL(t, server.URL)
|
||||
|
||||
connection := &vclib.VSphereConnection{
|
||||
Hostname: u.Hostname(),
|
||||
|
@ -142,7 +142,7 @@ func TestWithValidThumbprint(t *testing.T) {
|
|||
server, thumbprint :=
|
||||
createTestServer(t, fixtures.CaCertPath, fixtures.ServerCertPath, fixtures.ServerKeyPath, handler)
|
||||
server.StartTLS()
|
||||
u := mustParseUrl(t, server.URL)
|
||||
u := mustParseURL(t, server.URL)
|
||||
|
||||
connection := &vclib.VSphereConnection{
|
||||
Hostname: u.Hostname(),
|
||||
|
@ -213,7 +213,7 @@ func getRequestVerifier(t *testing.T) (http.HandlerFunc, func()) {
|
|||
return handler, checker
|
||||
}
|
||||
|
||||
func mustParseUrl(t *testing.T, i string) *url.URL {
|
||||
func mustParseURL(t *testing.T, i string) *url.URL {
|
||||
u, err := url.Parse(i)
|
||||
if err != nil {
|
||||
t.Fatalf("Cannot parse URL: %v", err)
|
||||
|
|
|
@ -22,7 +22,7 @@ const (
|
|||
// Unhealthy means that the device is unhealthy
|
||||
Unhealthy = "Unhealthy"
|
||||
|
||||
// Current version of the API supported by kubelet
|
||||
// Version is the current version of the API supported by kubelet
|
||||
Version = "v1alpha2"
|
||||
// DevicePluginPath is the folder the Device Plugin is expecting sockets to be on
|
||||
// Only privileged pods have access to this path
|
||||
|
|
|
@ -17,6 +17,8 @@ limitations under the License.
|
|||
package pluginregistration
|
||||
|
||||
const (
|
||||
CSIPlugin = "CSIPlugin"
|
||||
// CSIPlugin identifier for registered CSI plugins
|
||||
CSIPlugin = "CSIPlugin"
|
||||
// DevicePlugin identifier for registered device plugins
|
||||
DevicePlugin = "DevicePlugin"
|
||||
)
|
||||
|
|
|
@ -17,6 +17,8 @@ limitations under the License.
|
|||
package pluginregistration
|
||||
|
||||
const (
|
||||
CSIPlugin = "CSIPlugin"
|
||||
// CSIPlugin identifier for registered CSI plugins
|
||||
CSIPlugin = "CSIPlugin"
|
||||
// DevicePlugin identifier for registered device plugins
|
||||
DevicePlugin = "DevicePlugin"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue