dqwmhrxt68679 2016-06-18 13:30
浏览 53
已采纳

将数组转换为csv

I have an array of different values - is there a way to convert it to csv string and output it via fmt.Print to stdout, without writing the csv to some file?

As far as I know, if I create a csv writer, I have to pass io file as a parameter, is there a way to just output it?

  • 写回答

2条回答 默认 最新

  • douyouzheng2209 2016-06-18 13:36
    关注

    Use os.Stdout as your io.Writer.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?