screenSetValuesForCoercion walks every comma-separated pair in every --set entry and emits a warning per footgun-shape match. The screen is non-fatal: parsing proceeds as before, the warning is the only behavioural change.
(values []string)
| 107 | // The screen is non-fatal: parsing proceeds as before, the warning |
| 108 | // is the only behavioural change. |
| 109 | func screenSetValuesForCoercion(values []string) { |
| 110 | for _, value := range values { |
| 111 | for _, pair := range splitChainedSetValue(value) { |
| 112 | if looksLikeAccidentalSetCoercion(pair) { |
| 113 | emitSetValueCoercionWarning(pair) |
| 114 | } |
| 115 | } |
| 116 | } |
| 117 | } |
no test coverage detected