Skip to content

Commit

Permalink
code clean for the Ns(none) return string. (#67)
Browse files Browse the repository at this point in the history
Signed-off-by: yanggang <[email protected]>
  • Loading branch information
杨刚 authored Jan 23, 2023
1 parent 1104d96 commit 7a452d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nshandle_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion nshandle_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7a452d2

Please sign in to comment.