// DFRColNames returns a function which will specify the column names
// for the DFReader to use
DFRColNames returns a function which will specify the column names
for the DFReader to use
// DFRColNames returns a function which will specify the column names // for the DFReader to use
func DFRColNames(names ...string) DFReaderOpt {
	return func(dfr *DFReader) error {
		if dfr.hasHeader {
			return ErrHasNamesAndHeader
		}
		if len(names) == 0 {
			return ErrNoNamesGiven
		}
		if len(dfr.colNames) != 0 {
			return ErrNamesAlreadySet
		}
		if len(dfr.colTypes) != 0 && len(dfr.colTypes) != len(names) {
			return dfErrorf(
				"the number of column types (%d) and names (%d) differ",
				len(dfr.colTypes), len(names))
		}
		dfr.colNames = names
		return nil
	}
}
func DFRColNames ( names ... string ) DFReaderOpt { return func ( dfr * DFReader ) error { if dfr . hasHeader { return ErrHasNamesAndHeader } if len ( names ) == 0 { return ErrNoNamesGiven } if len ( dfr . colNames ) != 0 { return ErrNamesAlreadySet } if len ( dfr . colTypes ) != 0 && len ( dfr . colTypes ) != len ( names ) { return dfErrorf ( " " , len ( dfr . colTypes ) , len ( names ) ) } dfr . colNames = names return nil } }
DFRColNames returns a function which will specify the column names
for the DFReader to use
DFRColNames returns a function which will specify the column names for the DFReader to use