Commit 5e9d7f7
refactor(config): extract shared non-empty string slice validator
Consolidates validateAgentIDs and validateTrustedBots onto a single
validateNonEmptyStringSlice helper in validation_rules.go, removing
duplicated 'non-empty array of non-empty strings' logic identified in
issue #12143. ValidateStringArrayField in guard_policy_validation.go
was left unchanged since it operates on []interface{} (not []string)
and its distinct error-message wording is pinned by existing tests.
Closes #12143
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 34ed844 commit 5e9d7f7
2 files changed
Lines changed: 22 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 107 | + | |
119 | 108 | | |
120 | 109 | | |
121 | 110 | | |
| |||
136 | 125 | | |
137 | 126 | | |
138 | 127 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 128 | + | |
151 | 129 | | |
152 | 130 | | |
153 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
35 | 55 | | |
36 | 56 | | |
37 | 57 | | |
| |||
0 commit comments