From 7583bce4ab254580a51da390bb6915cbc6cf24c3 Mon Sep 17 00:00:00 2001 From: yanxuean Date: Wed, 7 Feb 2018 20:13:01 +0800 Subject: [PATCH] some comments Signed-off-by: yanxuean --- pkg/os/os.go | 4 ++-- pkg/server/helpers.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/os/os.go b/pkg/os/os.go index b7c1384db..128ffb8f9 100644 --- a/pkg/os/os.go +++ b/pkg/os/os.go @@ -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 { diff --git a/pkg/server/helpers.go b/pkg/server/helpers.go index 5a30c8d9d..d59cc71bb 100644 --- a/pkg/server/helpers.go +++ b/pkg/server/helpers.go @@ -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) }