File: errors_linux.go

package info (click to toggle)
golang-github-hugelgupf-p9 0.3.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 608 kB
  • sloc: makefile: 9
file content (17 lines) | stat: -rw-r--r-- 218 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//go:build linux
// +build linux

package linux

import (
	"errors"
	"syscall"
)

func sysErrno(err error) Errno {
	var systemErr syscall.Errno
	if errors.As(err, &systemErr) {
		return Errno(systemErr)
	}
	return 0
}