some comments
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
This commit is contained in:
parent
0c87604068
commit
7583bce4ab
@ -47,7 +47,7 @@ type OS interface {
|
||||
// RealOS is used to dispatch the real system level operations.
|
||||
type RealOS struct{}
|
||||
|
||||
// MkdirAll will will call os.MkdirAll to create a directory.
|
||||
// MkdirAll will call os.MkdirAll to create a directory.
|
||||
func (RealOS) MkdirAll(path string, perm os.FileMode) error {
|
||||
return os.MkdirAll(path, perm)
|
||||
}
|
||||
@ -79,7 +79,7 @@ func (RealOS) ResolveSymbolicLink(path string) (string, error) {
|
||||
return filepath.EvalSymlinks(path)
|
||||
}
|
||||
|
||||
// CopyFile copys src file to dest file
|
||||
// CopyFile will copy src file to dest file
|
||||
func (RealOS) CopyFile(src, dest string, perm os.FileMode) error {
|
||||
in, err := os.Open(src)
|
||||
if err != nil {
|
||||
|
@ -126,9 +126,9 @@ func makeSandboxName(s *runtime.PodSandboxMetadata) string {
|
||||
func makeContainerName(c *runtime.ContainerMetadata, s *runtime.PodSandboxMetadata) string {
|
||||
return strings.Join([]string{
|
||||
c.Name, // 0
|
||||
s.Name, // 1: sandbox name
|
||||
s.Namespace, // 2: sandbox namespace
|
||||
s.Uid, // 3: sandbox uid
|
||||
s.Name, // 1: pod name
|
||||
s.Namespace, // 2: pod namespace
|
||||
s.Uid, // 3: pod uid
|
||||
fmt.Sprintf("%d", c.Attempt), // 4
|
||||
}, nameDelimiter)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user