The MemoryStream implements the stream interface using a simple byte array. The byte array length is used as the stream length. The name needs to be provided when initializing a new MemoryStream instance.
| 12 | // The name needs to be provided when initializing a new MemoryStream |
| 13 | // instance. |
| 14 | type MemoryStream struct { |
| 15 | name string |
| 16 | data []byte |
| 17 | } |
| 18 | |
| 19 | func (s MemoryStream) Name() string { |
| 20 | return s.name |
nothing calls this directly
no outgoing calls
no test coverage detected