(body map[string]any, keys ...string)
| 140 | } |
| 141 | |
| 142 | func firstStringFromMap(body map[string]any, keys ...string) string { |
| 143 | if len(body) == 0 { |
| 144 | return "" |
| 145 | } |
| 146 | for _, key := range keys { |
| 147 | if value, ok := body[key]; ok { |
| 148 | if s, ok := value.(string); ok { |
| 149 | return strings.TrimSpace(s) |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | return "" |
| 154 | } |
| 155 | |
| 156 | func firstFormValue(c *gin.Context, keys ...string) string { |
| 157 | for _, key := range keys { |
no outgoing calls
no test coverage detected