go_goutils/logging/funcs_nullwriter.go

13 lines
254 B
Go
Raw Normal View History

package logging
// nulLWriter writes... nothing. To avoid errors, however, in downstream code it pretends it does (n will *always* == len(b)).
func (nw *nullWriter) Write(b []byte) (n int, err error) {
if b == nil {
return
}
n = len(b)
return
}