| 1 | // Copyright The OpenTelemetry Authors |
| 2 | // SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| 4 | //go:build windows |
| 5 | |
| 6 | package otlptext // import "go.opentelemetry.io/collector/exporter/debugexporter/internal/otlptext" |
| 7 | |
| 8 | import ( |
| 9 | "errors" |
| 10 | |
| 11 | "golang.org/x/sys/windows" |
| 12 | ) |
| 13 | |
| 14 | // knownSyncError returns true if the given error is one of the known |
| 15 | // non-actionable errors returned by Sync on Windows: |
| 16 | // |
| 17 | // - sync /dev/stderr: The handle is invalid. |
| 18 | func knownSyncError(err error) bool { |
| 19 | return errors.Is(err, windows.ERROR_INVALID_HANDLE) |
| 20 | } |