I'm trying to convert an influxdb record
(type: []interface{}
) to []string
so I can write it to csv.
Record
[2018-12-20T07:26:23Z 90 123.2132 12.3232 30 1 user]
Code
s := make([]string, len(record))
for i, v := range record {
s[i] = v.(string)
}
But I got this error
interface {} is json.Number, not string
I'm new to golang and not too familiar with interface and json