Refactor encoding to use *string instead of string as input

I don't want to clone the whole input string
This commit is contained in:
2024-07-31 12:58:02 +02:00
parent 7b4fcf3de1
commit 7001f2c51a
5 changed files with 19 additions and 18 deletions

View File

@@ -3,6 +3,6 @@ package encoding
import "bytes"
type Coder interface {
Encode(s string, buf *bytes.Buffer) error
Encode(s *string, buf *bytes.Buffer) error
Decode(buf *bytes.Buffer) (string, error)
}