添加 FromCsvReader 方法,以允许使用自定义的 csv 读取器构建行。
作者: stayingalivee创建于 2024年6月30日更新于 2024年8月12日
标签good-first-issue
Proposal
Under the existing design, users have to manually modify their csv string to match with csv reader defaults. The func (r *Rows) FromCSVString(s string) *Rows function initializes a csv reader with defaults. Users may have a pipe separated csv or some other token. Also, users cannot enable lazyQoutes (see: https://cs.opensource.google/go/go/+/refs/tags/go1.22.4:src/encoding/csv/reader.go;l=136) which is sometimes needed if you have a json string in the csv file without having to modify the csv extensively to match the defaults.
内容来源: DATA-DOG/go-sqlmock