mirror of
https://github.com/AdguardTeam/dnsproxy.git
synced 2026-10-12 02:01:26 +00:00
Merge in DNS/dnsproxy from upd to master Squashed commit of the following: commit 54950780c2bb397111a7aa953e8d8b8b15902359 Author: Ainar Garipov <[email protected]> Date: Thu Dec 23 14:38:06 2021 +0300 upstream: imp code commit 0ddc6311f6b387b3de93faf739fbbde7cff1f039 Author: Ainar Garipov <[email protected]> Date: Wed Dec 22 21:08:13 2021 +0300 all: upd more commit cf987ed1228dbf97e0cfb832e79242af81b906d9 Author: Ainar Garipov <[email protected]> Date: Wed Dec 22 20:50:01 2021 +0300 proxy: fmt commit 31821af78ad83419495841fe6f0abc114151950e Author: Ainar Garipov <[email protected]> Date: Wed Dec 22 20:47:44 2021 +0300 all: upd go, simplify code
24 lines
516 B
Go
24 lines
516 B
Go
//go:build !plan9
|
|
// +build !plan9
|
|
|
|
package proxy
|
|
|
|
import (
|
|
"errors"
|
|
"syscall"
|
|
)
|
|
|
|
// isEPIPE checks if the underlying error is EPIPE. syscall.EPIPE exists on all
|
|
// OSes except for Plan 9. Validate with:
|
|
//
|
|
// $ for os in $(go tool dist list | cut -d / -f 1 | sort -u)
|
|
// do
|
|
// echo -n "$os"
|
|
// env GOOS="$os" go doc syscall.EPIPE | grep -F -e EPIPE
|
|
// done
|
|
//
|
|
// For the Plan 9 version see ./errors_plan9.go.
|
|
func isEPIPE(err error) (ok bool) {
|
|
return errors.Is(err, syscall.EPIPE)
|
|
}
|