me when i dont use vcs properly v2

This commit is contained in:
adman
2026-01-02 00:48:46 +01:00
parent 8400d8f5dc
commit a1b7969080
9 changed files with 177 additions and 116 deletions
+3 -1
View File
@@ -25,6 +25,8 @@ const (
var Order binary.ByteOrder = binary.BigEndian
var BadStringLengthError = errors.New("bad string length")
type Tag struct {
Name string
Value any
@@ -190,7 +192,7 @@ func readPayload(id int8, r io.Reader) (ret any, err error) {
return
}
if len(s) != int(l) {
err = errors.New("bad string length")
err = BadStringLengthError
return
}
ret = string(s)