// DFRSkipCols returns a function which will specify the columns in the
// source data to be skipped. Note that columns are numbered from zero not
// one.
DFRSkipCols returns a function which will specify the columns in the
source data to be skipped. Note that columns are numbered from zero not
one.
// DFRSkipCols returns a function which will specify the columns in the // source data to be skipped . Note that columns are numbered from zero not // one .
func DFRSkipCols(skips ...int) DFReaderOpt {
	return func(dfr *DFReader) error {
		if len(skips) == 0 {
			return ErrNoSkipColsGiven
		}
		if len(dfr.skipCols) != 0 {
			return ErrSkipIndexesAlreadySet
		}
		for i, si := range skips {
			if si < 0 {
				return dfErrorf(
					"a negative skip index has been given: skips[%d] == %d",
					i, si)
			}
			if _, ok := dfr.skipCols[si]; ok {
				return dfErrorf(
					"a duplicate skip index has been given: skips[%d] == %d",
					i, si)
			}
			dfr.skipCols[si] = true
		}
		return nil
	}
}
func DFRSkipCols ( skips ... int ) DFReaderOpt { return func ( dfr * DFReader ) error { if len ( skips ) == 0 { return ErrNoSkipColsGiven } if len ( dfr . skipCols ) != 0 { return ErrSkipIndexesAlreadySet } for i , si := range skips { if si < 0 { return dfErrorf ( " " , i , si ) } if _ , ok := dfr . skipCols [ si ] ; ok { return dfErrorf ( " " , i , si ) } dfr . skipCols [ si ] = true } return nil } }
DFRSkipCols returns a function which will specify the columns in the
source data to be skipped.
DFRSkipCols returns a function which will specify the columns in the source data to be skipped .