We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi there,
I'm wondering why encoding/json could work with []interface{} but not gocsv, can you explain why won't you implement that?
I had to do a lot a reflect job to fix this, it looks very much unnecessary to me, e.g
func DoEncode(tx *gorm.DB, resultModel interface{}, query string) { var ( result = reflect.New(resultType).Interface() ) // use gorm to fill result repeatly ... tx.ScanRows(rows, result) ... resultSlice := reflect.MakeSlice(reflect.SliceOf(resultType), 1, 1) resultSlice = reflect.Append(resultSlice, reflect.ValueOf(result).Elem()) data, err := gocsv.MarshalString(resultSlice.Interface()) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi there,
I'm wondering why encoding/json could work with []interface{} but not gocsv, can you explain why won't you implement that?
I had to do a lot a reflect job to fix this, it looks very much unnecessary to me, e.g
The text was updated successfully, but these errors were encountered: