Conditions | 3 |
Total Lines | 6 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | //////////////////////////////////////////////////////////////////////////////// |
||
46 | func (l *Logger) Write(p []byte) (n int, err error) { |
||
47 | if l == nil || isClosedCh(l.Channel) { |
||
48 | return 0, errors.New("the channel was closed for recording") |
||
49 | } |
||
50 | l.Channel <- string(p) |
||
51 | return len(p), nil |
||
52 | } |
||
77 |