| 534 | } |
| 535 | |
| 536 | func checkIfPathMatchesSyncKeyTemplate(path string, syncKeyTemplate string) bool { |
| 537 | syncKeyTemplateSplit := strings.Split(syncKeyTemplate, "/") |
| 538 | schemaPathSplit := strings.Split(path, "/") |
| 539 | if len(schemaPathSplit) == len(syncKeyTemplateSplit) { |
| 540 | for k, v := range syncKeyTemplateSplit { |
| 541 | if strings.HasPrefix(v, "{{") { |
| 542 | continue |
| 543 | } else if schemaPathSplit[k] != syncKeyTemplateSplit[k] { |
| 544 | return false |
| 545 | } |
| 546 | } |
| 547 | return true |
| 548 | } |
| 549 | return false |
| 550 | } |
| 551 | |
| 552 | // FormatParentID ... |
| 553 | func FormatParentID(parent string) string { |