(raw any)
| 100 | } |
| 101 | |
| 102 | func stringSlice(raw any) []string { |
| 103 | switch values := raw.(type) { |
| 104 | case []string: |
| 105 | out := make([]string, 0, len(values)) |
| 106 | for _, value := range values { |
| 107 | if text := strings.TrimSpace(value); text != "" { |
| 108 | out = append(out, text) |
| 109 | } |
| 110 | } |
| 111 | return out |
| 112 | case []any: |
| 113 | out := make([]string, 0, len(values)) |
| 114 | for _, value := range values { |
| 115 | if text := strings.TrimSpace(fmt.Sprint(value)); text != "" { |
| 116 | out = append(out, text) |
| 117 | } |
| 118 | } |
| 119 | return out |
| 120 | default: |
| 121 | return nil |
| 122 | } |
| 123 | } |
no outgoing calls
no test coverage detected