Commit 03e6c55
Bugfix: Use strings.TrimSuffix in func applyPolicies (#6)
TrimRight would result in bug where the last letters could be omitted when
getting the policy name from the policy file name.
Ex: file: consul.hcl -> name: consu
Actually TrimRight actually remove all rune in pattern from the string. (naming is hard...)
Using strings.TrimSuffix fixes it.1 parent 34cbcc6 commit 03e6c55
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
0 commit comments