Matheus Sampaio Queiroga 78b1fdf255
All checks were successful
Test / Test (pull_request) Successful in 1m14s
Cleaner Client
Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
2024-09-20 11:03:51 -03:00

16 lines
265 B
Go

package structcode
import (
"bytes"
)
func Marshal(target any) ([]byte, error) {
buff := new(bytes.Buffer)
err := NewEncode(buff, target)
return buff.Bytes(), err
}
func Unmarshal(b []byte, target any) error {
return NewDecode(bytes.NewReader(b), target)
}