Skip to content

Commit

Permalink
ajout de logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josquin Cornec committed Jan 14, 2025
1 parent 60f29bc commit 29144c1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions createfilter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ func DetectDateFinEffectif(path string, nIgnoredCols int) (dateFinEffectif time.
nbColsToExclude := guessLastNMissingFromReader(r, nIgnoredCols)
lastColWithValue := len(header) - 1 - nbColsToExclude - nIgnoredCols
lastPeriodWithValue := header[lastColWithValue]
log.Printf("nIgnoredCols: %d\n", nIgnoredCols)
log.Printf("nbColsToExclude: %d\n", nbColsToExclude)
log.Printf("lastColWithValue: %d\n", lastColWithValue)
log.Printf("lastPeriodWithValue: %s\n", lastPeriodWithValue)
return effectifColNameToDate(lastPeriodWithValue)
}

Expand Down Expand Up @@ -227,5 +231,7 @@ func guessLastNMissingFromReader(r *csv.Reader, nIgnoredCols int) int {
}
}
}
log.Printf("lastConsideredCol: %d\n", lastConsideredCol)
log.Printf("lastColWithValue: %d\n", lastColWithValue)
return lastConsideredCol - lastColWithValue
}

0 comments on commit 29144c1

Please sign in to comment.