mirror of https://github.com/vishvananda/netns
code clean for the Ns(none) return string. (#67)
Signed-off-by: yanggang <gang.yang@daocloud.io>
This commit is contained in:
parent
1104d961a9
commit
7a452d2d15
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue