errNonLinux returns an error which wraps [internal.ErrNotSupportedOnOS] and includes the name of the calling function.
()
| 11 | // errNonLinux returns an error which wraps [internal.ErrNotSupportedOnOS] and |
| 12 | // includes the name of the calling function. |
| 13 | func errNonLinux() error { |
| 14 | name := "unknown" |
| 15 | pc, _, _, ok := runtime.Caller(1) |
| 16 | if ok { |
| 17 | name = runtime.FuncForPC(pc).Name() |
| 18 | if pos := strings.LastIndexByte(name, '.'); pos != -1 { |
| 19 | name = name[pos+1:] |
| 20 | } |
| 21 | } |
| 22 | return fmt.Errorf("unix: %s: %w", name, internal.ErrNotSupportedOnOS) |
| 23 | } |
searching dependent graphs…