Add strings pkg to hold strings utils

Replace funtions with strings pkg

Fix all references and rename the pkg
This commit is contained in:
harry
2016-01-11 15:55:51 +08:00
parent da5251ad60
commit 7405c7899b
25 changed files with 154 additions and 109 deletions

View File

@@ -24,8 +24,8 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/types"
"k8s.io/kubernetes/pkg/util"
"k8s.io/kubernetes/pkg/util/exec"
utilstrings "k8s.io/kubernetes/pkg/util/strings"
"k8s.io/kubernetes/pkg/volume"
volumeutil "k8s.io/kubernetes/pkg/volume/util"
)
@@ -97,7 +97,7 @@ var _ volume.Volume = &gitRepoVolume{}
func (gr *gitRepoVolume) GetPath() string {
name := gitRepoPluginName
return gr.plugin.host.GetPodVolumeDir(gr.podUID, util.EscapeQualifiedNameForDisk(name), gr.volName)
return gr.plugin.host.GetPodVolumeDir(gr.podUID, utilstrings.EscapeQualifiedNameForDisk(name), gr.volName)
}
// gitRepoVolumeBuilder builds git repo volumes.
@@ -195,7 +195,7 @@ func (b *gitRepoVolumeBuilder) SetUpAt(dir string) error {
}
func (b *gitRepoVolumeBuilder) getMetaDir() string {
return path.Join(b.plugin.host.GetPodPluginDir(b.podUID, util.EscapeQualifiedNameForDisk(gitRepoPluginName)), b.volName)
return path.Join(b.plugin.host.GetPodPluginDir(b.podUID, utilstrings.EscapeQualifiedNameForDisk(gitRepoPluginName)), b.volName)
}
func (b *gitRepoVolumeBuilder) execCommand(command string, args []string, dir string) ([]byte, error) {