From 350ed1103af50dab336a15711a4b70f263867936 Mon Sep 17 00:00:00 2001 From: yanggang Date: Sun, 22 Jan 2023 08:45:47 +0800 Subject: [PATCH] code clean for the Ns(none) return string. Signed-off-by: yanggang --- nshandle_linux.go | 2 +- nshandle_others.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nshandle_linux.go b/nshandle_linux.go index 0e11171..1baffb6 100644 --- a/nshandle_linux.go +++ b/nshandle_linux.go @@ -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 { diff --git a/nshandle_others.go b/nshandle_others.go index 7a87acb..af727bc 100644 --- a/nshandle_others.go +++ b/nshandle_others.go @@ -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