mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
cdbca4061b
Older versions of Go don't format comments, so committing this as
a separate commit, so that we can already make these changes before
we upgrade to Go 1.19.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 52c1a2fae8
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
13 lines
263 B
Go
13 lines
263 B
Go
package testutils
|
|
|
|
import "testing"
|
|
|
|
// SetupTestOSContext joins a new network namespace, and returns its associated
|
|
// teardown function.
|
|
//
|
|
// Example usage:
|
|
//
|
|
// defer SetupTestOSContext(t)()
|
|
func SetupTestOSContext(t *testing.T) func() {
|
|
return func() {}
|
|
}
|