Add start/limit flags

This commit is contained in:
Pim van Pelt
2025-08-26 10:07:53 +02:00
parent a044cb86bd
commit 6bc0071bdb

View File

@@ -42,6 +42,14 @@ func generateEnv(yamlFile string) {
args = append(args, fmt.Sprintf("--http_endpoint=%s", logEntry.Listen))
}
// Add not_after flags if specified
if !logEntry.NotAfterStart.IsZero() {
args = append(args, fmt.Sprintf("--not_after_start=%s", logEntry.NotAfterStart.Format("2006-01-02T15:04:05Z")))
}
if !logEntry.NotAfterLimit.IsZero() {
args = append(args, fmt.Sprintf("--not_after_limit=%s", logEntry.NotAfterLimit.Format("2006-01-02T15:04:05Z")))
}
tesseractArgs := strings.Join(args, " ")
envContent := fmt.Sprintf("TESSERACT_ARGS=\"%s\"\nOTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318\n", tesseractArgs)