Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
gocsv
✓ github.com/gocarina/gocsv
Unmarshal CSV string into a slice of structs.
package main
import (
"fmt"
"github.com/gocarina/gocsv"
)
type Person struct {
Name string `csv:"name"`
Age int `csv:"age"`
}
func main() {
csvData := "name,age\nAlice,30\nBob,25"
var people []Person
if err := gocsv.UnmarshalString(csvData, &people); err != nil {
panic(err)
}
fmt.Printf("%+v", people)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20260607070740-0735908c6461latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.