[go-nuts] Re: Why dont the Marshal & Unmarshal use same amount of arguments and return values

2017-02-23 Thread Jianhua Li
i meant the json library > On 23 Feb 2017, at 20:42, Jianhua Li wrote: > > func Marshal(v interface{}) ([]byte, error) > func Unmarshal(data []byte, v interface{}) error > > Why dont the Marshal & Unmarshal use same amount of arguments, and same > amount of return

[go-nuts] Why dont the Marshal & Unmarshal use same amount of arguments and return values

2017-02-23 Thread Jianhua Li
func Marshal(v interface{}) ([]byte, error) func Unmarshal(data []byte, v interface{}) error Why dont the Marshal & Unmarshal use same amount of arguments, and same amount of return values like one of these. //1. func Marshal(data[]byte, v interface{}) (error) func Unmarshal(data []byte, v inter