Skip to content

Commit 7a452d2

Browse files
author
杨刚
authored
code clean for the Ns(none) return string. (#67)
Signed-off-by: yanggang <[email protected]>
1 parent 1104d96 commit 7a452d2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: nshandle_linux.go

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

Diff for: nshandle_others.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func (ns NsHandle) Equal(_ NsHandle) bool {
1717
// It is only implemented on Linux, and returns "NS(none)" on other
1818
// platforms.
1919
func (ns NsHandle) String() string {
20-
return "NS(None)"
20+
return "NS(none)"
2121
}
2222

2323
// UniqueId returns a string which uniquely identifies the namespace

0 commit comments

Comments
 (0)