code clean for the Ns(none) return string. (#67)

Signed-off-by: yanggang <gang.yang@daocloud.io>
This commit is contained in:
杨刚 2023-01-24 02:27:00 +08:00 committed by GitHub
parent 1104d961a9
commit 7a452d2d15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ func (ns NsHandle) Equal(other NsHandle) bool {
// String shows the file descriptor number and its dev and inode.
func (ns NsHandle) String() string {
if ns == -1 {
return "NS(None)"
return "NS(none)"
}
var s unix.Stat_t
if err := unix.Fstat(int(ns), &s); err != nil {

View File

@ -17,7 +17,7 @@ func (ns NsHandle) Equal(_ NsHandle) bool {
// It is only implemented on Linux, and returns "NS(none)" on other
// platforms.
func (ns NsHandle) String() string {
return "NS(None)"
return "NS(none)"
}
// UniqueId returns a string which uniquely identifies the namespace