// Copyright 2017 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.// +build darwin dragonfly freebsd linux netbsd openbsd solarispackagesocketimport"syscall"var(errEAGAINerror=syscall.EAGAINerrEINVALerror=syscall.EINVALerrENOENTerror=syscall.ENOENT)// errnoErr returns common boxed Errno values, to prevent allocations// at runtime.funcerrnoErr(errnosyscall.Errno)error{switcherrno{case0:returnnilcasesyscall.EAGAIN:returnerrEAGAINcasesyscall.EINVAL:returnerrEINVALcasesyscall.ENOENT:returnerrENOENT}returnerrno}