(path string)
| 149 | } |
| 150 | |
| 151 | func (sr *sinkRegistry) newFileSinkFromPath(path string) (Sink, error) { |
| 152 | switch path { |
| 153 | case "stdout": |
| 154 | return nopCloserSink{os.Stdout}, nil |
| 155 | case "stderr": |
| 156 | return nopCloserSink{os.Stderr}, nil |
| 157 | } |
| 158 | return sr.openFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0o666) |
| 159 | } |
| 160 | |
| 161 | func normalizeScheme(s string) (string, error) { |
| 162 | // https://tools.ietf.org/html/rfc3986#section-3.1 |
no outgoing calls
no test coverage detected