(path string, mode os.FileMode)
| 126 | } |
| 127 | |
| 128 | func validateWorkspaceFileMode(path string, mode os.FileMode) error { |
| 129 | // Opening a FIFO can block before a reader is available to observe cancellation. |
| 130 | if mode&os.ModeNamedPipe != 0 { |
| 131 | return fmt.Errorf("file %q is a named pipe", path) |
| 132 | } |
| 133 | return nil |
| 134 | } |
| 135 | |
| 136 | func (fr *FileReader) readFromGitShow(parentCtx context.Context, path string) (string, error) { |
| 137 | ctx, cancel := context.WithTimeout(parentCtx, 30*time.Second) |
no outgoing calls