Skip to content

Commit 69e96a5

Browse files
thaJeztahjeffwidman
authored andcommitted
move package description to a doc.go
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 95c0705 commit 69e96a5

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

doc.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Package netns allows ultra-simple network namespace handling. NsHandles
2+
// can be retrieved and set. Note that the current namespace is thread
3+
// local so actions that set and reset namespaces should use LockOSThread
4+
// to make sure the namespace doesn't change due to a goroutine switch.
5+
// It is best to close NsHandles when you are done with them. This can be
6+
// accomplished via a `defer ns.Close()` on the handle. Changing namespaces
7+
// requires elevated privileges, so in most cases this code needs to be run
8+
// as root.
9+
package netns

netns.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
// Package netns allows ultra-simple network namespace handling. NsHandles
2-
// can be retrieved and set. Note that the current namespace is thread
3-
// local so actions that set and reset namespaces should use LockOSThread
4-
// to make sure the namespace doesn't change due to a goroutine switch.
5-
// It is best to close NsHandles when you are done with them. This can be
6-
// accomplished via a `defer ns.Close()` on the handle. Changing namespaces
7-
// requires elevated privileges, so in most cases this code needs to be run
8-
// as root.
91
package netns
102

113
import (

0 commit comments

Comments
 (0)