func parseNetUNIX(r io.Reader) (*NetUNIX, error) {
	s := bufio.NewScanner(r)
	s.Scan()
	hasInode := strings.Contains(s.Text(), "Inode")
	minFields := 6
	if hasInode {
		minFields++
	}
	var nu NetUNIX
	for s.Scan() {
		line := s.Text()
		item, err := nu.parseLine(line, hasInode, minFields)
		if err != nil {
			return nil, fmt.Errorf("failed to parse /proc/net/unix data %q: %v", line, err)
		}
		nu.Rows = append(nu.Rows, item)
	}
	if err := s.Err(); err != nil {
		return nil, fmt.Errorf("failed to scan /proc/net/unix data: %v", err)
	}
	return &nu, nil
}
parseNetUNIX creates a NetUnix structure from the incoming stream.
package procfs
import (
	"bufio"
	"fmt"
	"io"
	"os"
	"strconv"
	"strings"
)
const (
	netUnixTypeStream    = 1
	netUnixTypeDgram     = 2
	netUnixTypeSeqpacket = 5
	netUnixFlagDefault = 0
	netUnixFlagListen  = 1 << 16
	netUnixStateUnconnected  = 1
	netUnixStateConnecting   = 2
	netUnixStateConnected    = 3
	netUnixStateDisconnected = 4
)
type NetUNIXType uint64
type NetUNIXFlags uint64
type NetUNIXState uint64
type NetUNIXLine struct {
	KernelPtr string
	RefCount  uint64
	Protocol  uint64
	Flags     NetUNIXFlags
	Type      NetUNIXType
	State     NetUNIXState
	Inode     uint64
	Path      string
}
type NetUNIX struct {
	Rows []*NetUNIXLine
}
func (fs FS) NetUNIX() (*NetUNIX, error) {
	return readNetUNIX(fs.proc.Path("net/unix"))
}
func readNetUNIX(file string) (*NetUNIX, error) {
	f, err := os.Open(file)
	if err != nil {
		return nil, err
	}
	defer f.Close()
	return parseNetUNIX(f)
}