Commit 0da688f
doc: simplify code and improve clarity
- rename fileName variable to headerComment (it holds a comment, not
a filename)
- remove unnecessary filepath.FromSlash conversion (use forward slashes
consistently since this is a Unix filter tool)
- use t.TempDir() in tests instead of manual setup/teardown
- clarify README terminology: "block markers" with "block name"
instead of "magic comments"
These changes reduce complexity and better align with Go idioms for
a ~370 line single-file CLI tool.
#9
Co-authored-by: Warp <agent@warp.dev>1 parent 3eb1044 commit 0da688f
3 files changed
Lines changed: 33 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
| 252 | + | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
199 | 196 | | |
200 | 197 | | |
201 | 198 | | |
| |||
248 | 245 | | |
249 | 246 | | |
250 | 247 | | |
251 | | - | |
252 | | - | |
| 248 | + | |
| 249 | + | |
253 | 250 | | |
254 | | - | |
| 251 | + | |
255 | 252 | | |
256 | | - | |
| 253 | + | |
257 | 254 | | |
258 | 255 | | |
259 | | - | |
| 256 | + | |
260 | 257 | | |
261 | 258 | | |
262 | 259 | | |
| |||
282 | 279 | | |
283 | 280 | | |
284 | 281 | | |
285 | | - | |
| 282 | + | |
286 | 283 | | |
287 | 284 | | |
288 | 285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
64 | | - | |
| 64 | + | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
91 | 88 | | |
92 | 89 | | |
93 | 90 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
102 | 95 | | |
103 | 96 | | |
104 | 97 | | |
105 | 98 | | |
106 | 99 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
114 | 103 | | |
115 | 104 | | |
116 | 105 | | |
117 | 106 | | |
118 | 107 | | |
119 | 108 | | |
120 | | - | |
121 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
122 | 112 | | |
123 | | - | |
124 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
125 | 118 | | |
126 | 119 | | |
127 | 120 | | |
| |||
0 commit comments