marshal and unmarshal

69 views
Skip to first unread message

28911...@gmail.com

unread,
Nov 18, 2017, 9:26:03 AM11/18/17
to golang-nuts


I write the program in the 1111.txt.The purpose of this progaram is to marshal the structure,unmarshal it and output some result.But I can't output the marshal result and there are some errors exist .How to solve it??Thank you for reading.  
1111.txt
Auto Generated Inline Image 1

Yannic

unread,
Nov 18, 2017, 9:39:09 AM11/18/17
to golang-nuts
Your error can be easily fixed by writing []string{"xushiwei", "hughlv", "pandaman", "guangsong"} instead of{"xushiwei", "hughlv", "pandaman", "guangsong"} https://play.golang.org/p/XCg0_R7_ex
Also, please consider using https://play.golang.org to share code. It's much easier for everyone.
Reply all
Reply to author
Forward
0 new messages