MCPcopy
hub / github.com/uber-go/zap / newFileSinkFromPath

Method newFileSinkFromPath

sink.go:151–159  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

149}
150
151func (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
161func normalizeScheme(s string) (string, error) {
162 // https://tools.ietf.org/html/rfc3986#section-3.1

Callers 2

newSinkMethod · 0.95
newFileSinkFromURLMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected