2
0
mirror of synced 2025-02-23 06:08:07 +00:00

Add bencode.Bytes.GoString

This commit is contained in:
Matt Joiner 2022-03-09 20:57:23 +11:00
parent 859d31facb
commit 02b6ee9954
No known key found for this signature in database
GPG Key ID: 6B990B8185E7F782

View File

@ -2,6 +2,7 @@ package bencode
import (
"errors"
"fmt"
)
type Bytes []byte
@ -23,3 +24,7 @@ func (me Bytes) MarshalBencode() ([]byte, error) {
}
return me, nil
}
func (me Bytes) GoString() string {
return fmt.Sprintf("bencode.Bytes(%q)", []byte(me))
}