Skip to content

Commit 35400b9

Browse files
tklauserdims
authored andcommitted
ns: make NetlinkSocketsTimeout const
NetlinkSocketsTimeout isn't changed, so it can be a const. Signed-off-by: Tobias Klauser <[email protected]>
1 parent a47391a commit 35400b9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ns/init_linux.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ var (
1818
initNs netns.NsHandle
1919
initNl *netlink.Handle
2020
initOnce sync.Once
21-
// NetlinkSocketsTimeout represents the default timeout duration for the sockets
22-
NetlinkSocketsTimeout = 3 * time.Second
2321
)
2422

23+
// NetlinkSocketsTimeout represents the default timeout duration for the sockets
24+
const NetlinkSocketsTimeout = 3 * time.Second
25+
2526
// Init initializes a new network namespace
2627
func Init() {
2728
var err error

0 commit comments

Comments
 (0)