()
| 31 | } |
| 32 | |
| 33 | func (c *Custom) isValid() error { |
| 34 | if c.Fd <= 2 { |
| 35 | // File descriptors 0, 1, and 2 are reserved for stdin, stdout, and stderr. |
| 36 | return errors.New("invalid file descriptor for plugin connection") |
| 37 | } |
| 38 | return nil |
| 39 | } |
| 40 | |
| 41 | func FakeTestCustom(fd int) Custom { |
| 42 | return Custom{fd} |
no outgoing calls
no test coverage detected