fix golint errors in pkg/volume/host_path

This commit is contained in:
yameiwang 2018-11-02 05:16:00 +08:00
parent 2ec4467af1
commit f130e48deb
14 changed files with 16 additions and 17 deletions

View File

@ -96,7 +96,7 @@ go_library(
"//pkg/volume/flocker:go_default_library",
"//pkg/volume/gcepd:go_default_library",
"//pkg/volume/glusterfs:go_default_library",
"//pkg/volume/host_path:go_default_library",
"//pkg/volume/hostpath:go_default_library",
"//pkg/volume/iscsi:go_default_library",
"//pkg/volume/local:go_default_library",
"//pkg/volume/nfs:go_default_library",

View File

@ -40,7 +40,7 @@ import (
"k8s.io/kubernetes/pkg/volume/flocker"
"k8s.io/kubernetes/pkg/volume/gcepd"
"k8s.io/kubernetes/pkg/volume/glusterfs"
"k8s.io/kubernetes/pkg/volume/host_path"
"k8s.io/kubernetes/pkg/volume/hostpath"
"k8s.io/kubernetes/pkg/volume/iscsi"
"k8s.io/kubernetes/pkg/volume/local"
"k8s.io/kubernetes/pkg/volume/nfs"
@ -135,7 +135,7 @@ func ProbeControllerVolumePlugins(cloud cloudprovider.Interface, config persiste
if err := AttemptToLoadRecycler(config.PersistentVolumeRecyclerConfiguration.PodTemplateFilePathHostPath, &hostPathConfig); err != nil {
klog.Fatalf("Could not create hostpath recycler pod from file %s: %+v", config.PersistentVolumeRecyclerConfiguration.PodTemplateFilePathHostPath, err)
}
allPlugins = append(allPlugins, host_path.ProbeVolumePlugins(hostPathConfig)...)
allPlugins = append(allPlugins, hostpath.ProbeVolumePlugins(hostPathConfig)...)
nfsConfig := volume.VolumeConfig{
RecyclerMinimumTimeout: int(config.PersistentVolumeRecyclerConfiguration.MinimumTimeoutNFS),

View File

@ -96,7 +96,7 @@ go_library(
"//pkg/volume/gcepd:go_default_library",
"//pkg/volume/git_repo:go_default_library",
"//pkg/volume/glusterfs:go_default_library",
"//pkg/volume/host_path:go_default_library",
"//pkg/volume/hostpath:go_default_library",
"//pkg/volume/iscsi:go_default_library",
"//pkg/volume/local:go_default_library",
"//pkg/volume/nfs:go_default_library",

View File

@ -41,7 +41,7 @@ import (
"k8s.io/kubernetes/pkg/volume/gcepd"
"k8s.io/kubernetes/pkg/volume/git_repo"
"k8s.io/kubernetes/pkg/volume/glusterfs"
"k8s.io/kubernetes/pkg/volume/host_path"
"k8s.io/kubernetes/pkg/volume/hostpath"
"k8s.io/kubernetes/pkg/volume/iscsi"
"k8s.io/kubernetes/pkg/volume/local"
"k8s.io/kubernetes/pkg/volume/nfs"
@ -75,7 +75,7 @@ func ProbeVolumePlugins() []volume.VolumePlugin {
allPlugins = append(allPlugins, emptydir.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, gcepd.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, git_repo.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, host_path.ProbeVolumePlugins(volume.VolumeConfig{})...)
allPlugins = append(allPlugins, hostpath.ProbeVolumePlugins(volume.VolumeConfig{})...)
allPlugins = append(allPlugins, nfs.ProbeVolumePlugins(volume.VolumeConfig{})...)
allPlugins = append(allPlugins, secret.ProbeVolumePlugins()...)
allPlugins = append(allPlugins, iscsi.ProbeVolumePlugins()...)

View File

@ -344,7 +344,6 @@ pkg/volume/azure_file
pkg/volume/csi/csiv0
pkg/volume/csi/fake
pkg/volume/git_repo
pkg/volume/host_path
pkg/volume/iscsi
pkg/volume/nfs
pkg/volume/photon_pd

View File

@ -218,7 +218,7 @@ go_test(
"//pkg/volume/awsebs:go_default_library",
"//pkg/volume/azure_dd:go_default_library",
"//pkg/volume/gcepd:go_default_library",
"//pkg/volume/host_path:go_default_library",
"//pkg/volume/hostpath:go_default_library",
"//pkg/volume/testing:go_default_library",
"//pkg/volume/util:go_default_library",
"//pkg/volume/util/subpath:go_default_library",

View File

@ -72,7 +72,7 @@ import (
"k8s.io/kubernetes/pkg/volume/awsebs"
"k8s.io/kubernetes/pkg/volume/azure_dd"
"k8s.io/kubernetes/pkg/volume/gcepd"
_ "k8s.io/kubernetes/pkg/volume/host_path"
_ "k8s.io/kubernetes/pkg/volume/hostpath"
volumetest "k8s.io/kubernetes/pkg/volume/testing"
"k8s.io/kubernetes/pkg/volume/util"
"k8s.io/kubernetes/pkg/volume/util/subpath"

View File

@ -90,7 +90,7 @@ filegroup(
"//pkg/volume/gcepd:all-srcs",
"//pkg/volume/git_repo:all-srcs",
"//pkg/volume/glusterfs:all-srcs",
"//pkg/volume/host_path:all-srcs",
"//pkg/volume/hostpath:all-srcs",
"//pkg/volume/iscsi:all-srcs",
"//pkg/volume/local:all-srcs",
"//pkg/volume/nfs:all-srcs",

View File

@ -12,7 +12,7 @@ go_library(
"doc.go",
"host_path.go",
],
importpath = "k8s.io/kubernetes/pkg/volume/host_path",
importpath = "k8s.io/kubernetes/pkg/volume/hostpath",
deps = [
"//pkg/util/mount:go_default_library",
"//pkg/volume:go_default_library",

View File

@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package host_path contains the internal representation of hostPath
// Package hostpath contains the internal representation of hostPath
// volumes.
package host_path // import "k8s.io/kubernetes/pkg/volume/host_path"
package hostpath // import "k8s.io/kubernetes/pkg/volume/hostpath"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package host_path
package hostpath
import (
"fmt"
@ -32,7 +32,7 @@ import (
"k8s.io/kubernetes/pkg/volume/validation"
)
// This is the primary entrypoint for volume plugins.
// ProbeVolumePlugins is the primary entrypoint for volume plugins.
// The volumeConfig arg provides the ability to configure volume behavior. It is implemented as a pointer to allow nils.
// The hostPathPlugin is used to store the volumeConfig and give it, when needed, to the func that Recycles.
// Tests that exercise recycling should not use this func but instead use ProbeRecyclablePlugins() to override default behavior.

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
package host_path
package hostpath
import (
"fmt"

View File

@ -818,7 +818,7 @@ k8s.io/kubernetes/pkg/volume/flocker,jbeda,1,
k8s.io/kubernetes/pkg/volume/gcepd,saad-ali,0,
k8s.io/kubernetes/pkg/volume/git_repo,davidopp,1,
k8s.io/kubernetes/pkg/volume/glusterfs,tallclair,1,
k8s.io/kubernetes/pkg/volume/host_path,jbeda,1,
k8s.io/kubernetes/pkg/volume/hostpath,jbeda,1,
k8s.io/kubernetes/pkg/volume/iscsi,cjcullen,1,
k8s.io/kubernetes/pkg/volume/nfs,justinsb,1,
k8s.io/kubernetes/pkg/volume/photon_pd,luomiao,0,

1 name owner auto-assigned sig
818 k8s.io/kubernetes/pkg/volume/gcepd saad-ali 0
819 k8s.io/kubernetes/pkg/volume/git_repo davidopp 1
820 k8s.io/kubernetes/pkg/volume/glusterfs tallclair 1
821 k8s.io/kubernetes/pkg/volume/host_path k8s.io/kubernetes/pkg/volume/hostpath jbeda 1
822 k8s.io/kubernetes/pkg/volume/iscsi cjcullen 1
823 k8s.io/kubernetes/pkg/volume/nfs justinsb 1
824 k8s.io/kubernetes/pkg/volume/photon_pd luomiao 0