Skip to content

Commit e2b82a9

Browse files
committed
chore: remove fatih/color references, fix scanner error handling in mcp.go
- Remove stale fatih/color mentions from CLAUDE.md and .golangci.yml - Add missing color.go and update.go to CLAUDE.md structure listing - Surface scanner.Err() to stderr in extractCwdFromTranscript instead of silently discarding
1 parent 2a0da60 commit e2b82a9

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ linters:
44
settings:
55
errcheck:
66
exclude-functions:
7-
- (*github.com/fatih/color.Color).Print
8-
- (*github.com/fatih/color.Color).Printf
9-
- (*github.com/fatih/color.Color).Println
107
- fmt.Print
118
- fmt.Printf
129
- fmt.Println

CLAUDE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CLI tool that parses Claude Code JSONL logs from `~/.claude/projects/` and calcu
44

55
## Stack
66

7-
Go 1.26, stdlib + fatih/color, GoReleaser for cross-platform builds
7+
Go 1.26, stdlib only (zero external deps), GoReleaser for cross-platform builds
88

99
## Structure
1010

@@ -14,9 +14,11 @@ Go 1.26, stdlib + fatih/color, GoReleaser for cross-platform builds
1414
├── parser.go # JSONL log walking, file parsing (parseFile), deduplication by requestId
1515
├── pricing.go # Per-model pricing table, cost calculation, model name resolution
1616
├── format.go # Terminal and JSON output formatting
17+
├── color.go # ANSI color helpers (custom implementation, no external deps)
1718
├── statusline.go # Claude Code statusline mode (reads stdin JSON, outputs formatted cost line)
1819
├── currency.go # Currency config (~/.goccc.json), exchange rate fetching/caching, symbol table
1920
├── mcp.go # MCP server detection, per-project disable filtering, plugin walk
21+
├── update.go # Version update checking against GitHub releases
2022
├── *_test.go # Table-driven tests for each module
2123
├── fixture_test.go # Integration test against realistic JSONL fixture
2224
├── testdata/ # Static JSONL fixture (multi-turn convo with subagents)

mcp.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"bufio"
55
"encoding/json"
6+
"fmt"
67
"os"
78
"path/filepath"
89
"sort"
@@ -218,7 +219,9 @@ func extractCwdFromTranscript(transcriptPath string) string {
218219
return entry.Cwd
219220
}
220221
}
221-
_ = scanner.Err()
222+
if err := scanner.Err(); err != nil {
223+
fmt.Fprintf(os.Stderr, "goccc: warning: reading transcript for cwd: %v\n", err)
224+
}
222225
return ""
223226
}
224227

0 commit comments

Comments
 (0)