-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
For functions with a fixed output size prefer Write* APIs. For functions with "unbounded" output size prefer Append* APIs like the ones in strconv standard library package.
Examples that come to mind are as follows, also preferring []byte to []int8 because... []byte is Go's preffered unstructured data exchange format
func WsprMessage(...) ([]int8 error)
//becomes
func WriteWSPRMessage(dst []byte, ...) error
func Parity(uint64) []int8
// becomes
func WriteParity([]byte,uint64) error
func interleave([]int8) []int8
// becomes
func interleave([]byte) // Edit in place. No need to allocate, let user allocate if they need a copy of previous data, which does not seem to be the case.Metadata
Metadata
Assignees
Labels
No labels