Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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