(in string)
| 151 | } |
| 152 | |
| 153 | func scopeCollTypeMapping(in string) (string, string, string) { |
| 154 | vals := strings.SplitN(in, ".", 3) |
| 155 | scope := "_default" |
| 156 | collection := "_default" |
| 157 | typeMapping := "" |
| 158 | if len(vals) == 1 { |
| 159 | typeMapping = vals[0] |
| 160 | } else if len(vals) == 2 { |
| 161 | scope = vals[0] |
| 162 | collection = vals[1] |
| 163 | } else { |
| 164 | scope = vals[0] |
| 165 | collection = vals[1] |
| 166 | typeMapping = vals[2] |
| 167 | } |
| 168 | |
| 169 | return scope, collection, typeMapping |
| 170 | } |
| 171 | |
| 172 | // getScopeCollTypeMappings will return a deduplicated |
| 173 | // list of collection names when skipMappings is enabled. |
no outgoing calls
no test coverage detected