chop-dbhi / data-models-validator

Set of tools for validating data that should conform to a data model.
1 stars 2 forks source link

Extra column in a row causes a panic #31

Closed murphyke closed 8 years ago

murphyke commented 8 years ago

An extra column in a row causes a panic. An error message should be reported for this.

panic: runtime error: index out of range

goroutine 1 [running]:
panic(0x7fe440, 0xc8200100e0)
        /home/murphyke/go/src/runtime/panic.go:464 +0x3e6
github.com/chop-dbhi/data-models-validator.(*CSVReader).ScanLine(0xc820392480, 0xc82039e000, 0x1d, 0x1d, 0x0, 0x0)
        /home/murphyke/gowork/src/github.com/chop-dbhi/data-models-validator/csv.go:145 +0x3f7
github.com/chop-dbhi/data-models-validator.(*TableValidator).Next(0xc820321ce0, 0x0, 0x0)
        /home/murphyke/gowork/src/github.com/chop-dbhi/data-models-validator/validator.go:157 +0x68
github.com/chop-dbhi/data-models-validator.(*TableValidator).Run(0xc820321ce0, 0x0, 0x0)
        /home/murphyke/gowork/src/github.com/chop-dbhi/data-models-validator/validator.go:197 +0x3d
main.main()
        /home/murphyke/gowork/src/github.com/chop-dbhi/data-models-validator/cmd/validator/main.go:197 +0x14bb