netns_others.go 304 B

1234567891011121314
  1. //go:build !linux
  2. // +build !linux
  3. package socket
  4. import (
  5. "fmt"
  6. "runtime"
  7. )
  8. // withNetNS returns an error on non-Linux systems.
  9. func withNetNS(_ int, _ func() (*Conn, error)) (*Conn, error) {
  10. return nil, fmt.Errorf("socket: Linux network namespace support is not available on %s", runtime.GOOS)
  11. }