Commit 8adc9de
authored
Resolves #190
Note that `//go:generate` has unusual handling of flags with spaces so
the quotes have to include the flag name
([example](https://github.com/ARR4N/mock/blob/36b5e87796c7f82be7275e40bd54965c8605875c/mockgen/internal/tests/build_constraint/input.go#L3))
for complex constraints. This revealed a bug in
`--write_generate_directive`, which just prints space-delimited
`os.Args`.
The workaround of using `--copyright_file` is neither viable (it adds a
space between `//` and `go:build`) nor good practice as overloading
functionality can result in bugs due to unanticipated usage (e.g. the
aforementioned space).
1 parent c50d83c commit 8adc9de
3 files changed
Lines changed: 60 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
146 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
| |||
251 | 254 | | |
252 | 255 | | |
253 | 256 | | |
| 257 | + | |
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
| |||
306 | 310 | | |
307 | 311 | | |
308 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
309 | 319 | | |
310 | 320 | | |
311 | 321 | | |
| |||
0 commit comments