File: netns_others.go

package info (click to toggle)
golang-github-mdlayher-socket 0.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 256 kB
  • sloc: makefile: 2
file content (14 lines) | stat: -rw-r--r-- 304 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//go:build !linux
// +build !linux

package socket

import (
	"fmt"
	"runtime"
)

// withNetNS returns an error on non-Linux systems.
func withNetNS(_ int, _ func() (*Conn, error)) (*Conn, error) {
	return nil, fmt.Errorf("socket: Linux network namespace support is not available on %s", runtime.GOOS)
}