(idx string)
| 1137 | } |
| 1138 | |
| 1139 | func parseCanonicalArrayIndex(idx string) (int, error) { |
| 1140 | if idx == "" { |
| 1141 | return 0, fmt.Errorf("empty index") |
| 1142 | } |
| 1143 | i, err := strconv.Atoi(idx) |
| 1144 | if err != nil { |
| 1145 | return 0, err |
| 1146 | } |
| 1147 | if strconv.Itoa(i) != idx { |
| 1148 | return 0, fmt.Errorf("non-canonical array index") |
| 1149 | } |
| 1150 | return i, nil |
| 1151 | } |
| 1152 | |
| 1153 | // unsyncedConfigAccess traverses into the current config and performs |
| 1154 | // the operation at path according to method, using body and out as |
no outgoing calls
no test coverage detected