String returns the contents of the unread portion of the buffer as a string. If the Buffer is a nil pointer, it returns " ".
()
| 100 | // String returns the contents of the unread portion of the buffer |
| 101 | // as a string. If the Buffer is a nil pointer, it returns "<nil>". |
| 102 | func (s *Buffer) String() string { |
| 103 | s.mutex.Lock() |
| 104 | defer s.mutex.Unlock() |
| 105 | return s.buffer.String() |
| 106 | } |