diff options
Diffstat (limited to 'chunk.go')
-rw-r--r-- | chunk.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -107,3 +107,11 @@ func (c *TempChunk) Reader() ChunkReader { func (c *TempChunk) Len() int { return len(c.value) } + +func (c *TempChunk) AppendFrom(r io.Reader) { + buff, err := io.ReadAll(r) + if err != nil { + println("Chunk: error appending to temp chunk:", err) + } + c.value = append(c.value, buff...) +} |