Commit 8510055
committed
config: Require strictly-positive timeout values
If the timeout value was zero, the hook would always error, and there
doesn't seem to be much point to that. And I'm not sure what negative
timeouts would mean. By adding this restriction, we do not limit
useful hook entries, and we give the validation code grounds to warn
users attempting to validate configs which are poorly defined or have
useless hook entries.
Removing the pointer is not strictly required, but keeps up with our
anti-pointer zero-value style (style.md) now that Go's zero-value is
clearly invalid.
Signed-off-by: W. Trevor King <[email protected]>1 parent 0946333 commit 8510055
3 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
| 360 | + | |
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
0 commit comments