Update coders with error return values
Some checks failed
Benchmark BufferPool / RunBenchmarks (push) Failing after 25s
Run Tests / Test (push) Failing after 23s

This commit is contained in:
2024-07-25 16:53:14 +02:00
parent 0eb0f5d773
commit 92c0e83e73
3 changed files with 26 additions and 9 deletions

View File

@@ -4,10 +4,11 @@ import "bytes"
type ASCIICoder struct{}
func (c *ASCIICoder) Encode(s string, buf *bytes.Buffer) {
func (c *ASCIICoder) Encode(s string, buf *bytes.Buffer) error {
buf.WriteString(s)
return nil
}
func (c *ASCIICoder) Decode(buf *bytes.Buffer) string {
return buf.String()
func (c *ASCIICoder) Decode(buf *bytes.Buffer) (string, error) {
return buf.String(), nil
}