Commit 24c1f8d
Fix -template_params flag not being passed (Issue #149)
Resolves #149
The -template_params flag was defined in main.go but never passed to
the process.Options struct, making it non-functional. This was a bug
introduced in PR #90.
Changes:
- Added TemplateParams field to process.Options struct
- Updated main.go to pass *templateParams to process.Run()
- Updated process.go to parse JSON from TemplateParams string
- File-based params (-template_params_file) take precedence over
string-based params (-template_params) if both are provided
- Added proper error handling for invalid JSON
The flag now works as intended:
$ gotests -template_params '{"key":"value"}' -all file.go
Thanks to @butuzov for identifying this issue and @cweill for the fix suggestion!
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 307a738 commit 24c1f8d
2 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
79 | 91 | | |
80 | 92 | | |
81 | 93 | | |
| |||
0 commit comments