This is probably an FAQ but...
I've tried to understand this before but gave up; I am trying to (quick and dirty) import from a CSV or Excel file to a DB and I would like to take the slice from csv.Read() and just pass it through to stmt.Exec() but because the first is a []string and the second a []interface{} or []any (in 1.18+) it baulks. e.g.
fields, err := csv.Read()
... checks
_, err = stmt.Exec(fields)
I got round it by looping over the slice and putting appending the strings to a []interface{} local.
Is there a simpler way to do this inline - please ignore the issues around the contents or the number of elements for now.