Ver Fonte

rename: CHEAPO_DATE_FORMAT -> CHEAPO_CHATTO_OUTPUT_DATE_FORMAT

Paul Klumpp há 2 dias atrás
pai
commit
bf6187d715
5 ficheiros alterados com 18 adições e 4 exclusões
  1. 2 2
      .env.example
  2. 10 0
      .idea/.gitignore
  3. 4 0
      .idea/misc.xml
  4. 1 1
      AGENTS.md
  5. 1 1
      cmd/cheapo/chatto.go

+ 2 - 2
.env.example

@@ -10,8 +10,8 @@ CHATTO_TOKEN="<token>"               # set by the operator
 #   02.01.2006 15:04    -> 31.12.2026 23:59
 #   January 2, 2006     -> December 31, 2026
 # Reference: https://pkg.go.dev/time#Time.Format
-# CHEAPO_DATE_FORMAT=2006-01-02
-CHEAPO_DATE_FORMAT=02.01.2006
+# CHEAPO_CHATTO_OUTPUT_DATE_FORMAT=2006-01-02
+CHEAPO_CHATTO_OUTPUT_DATE_FORMAT=02.01.2006
 
 # Date format for CLI 'Free until:' output (Go time layout). Default: RFC3339 (ISO, unambiguous).
 # JSON output and MCP always use ISO-8601 regardless of this setting.

+ 10 - 0
.idea/.gitignore

@@ -0,0 +1,10 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Ignored default folder with query files
+/queries/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 4 - 0
.idea/misc.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="KubernetesApiProvider">{}</component>
+</project>

+ 1 - 1
AGENTS.md

@@ -99,7 +99,7 @@ How it gets the info:
 - **Unambiguous date outputs:** prefer ISO-8601 (RFC-3339 / `2006-01-02`)
   for machine-readable/structured surfaces (CLI `--json`, MCP `offer` wire type);
   compact locale-style formats (e.g. `02.01.`) are only for human-facing chat
-  messages and must be overridable via `CHEAPO_DATE_FORMAT`. The CLI's human-
+  messages and must be overridable via `CHEAPO_CHATTO_OUTPUT_DATE_FORMAT`. The CLI's human-
   readable "Free until:" line honors `CHEAPO_CLI_OUTPUT_DATE_FORMAT` (default
   RFC-3339). Avoid ambiguous `DD.MM.`/`MM/DD` outputs without a year.
 - Wrap errors with context: `fmt.Errorf("epic: ...: %w", err)`.

+ 1 - 1
cmd/cheapo/chatto.go

@@ -64,7 +64,7 @@ func formatGames(games []game.Game, mode string) string {
 	b.WriteString("| Game | Store | Price | Period |\n")
 	b.WriteString("|---|---|---|---|\n")
 	for _, g := range games {
-		dateFmt := os.Getenv("CHEAPO_DATE_FORMAT")
+		dateFmt := os.Getenv("CHEAPO_CHATTO_OUTPUT_DATE_FORMAT")
 		if dateFmt == "" {
 			dateFmt = "02.01.2006"
 		}