GetSchemaByURLPath - gets schema by resource path (from API)
(path string)
| 510 | |
| 511 | //GetSchemaByURLPath - gets schema by resource path (from API) |
| 512 | func GetSchemaByURLPath(path string) *Schema { |
| 513 | for _, schema := range GetManager().Schemas() { |
| 514 | if strings.HasPrefix(path+"/", schema.URL+"/") { |
| 515 | return schema |
| 516 | } |
| 517 | } |
| 518 | return nil |
| 519 | } |
| 520 | |
| 521 | //GetSchemaByPath - gets schema by sync_key_template path |
| 522 | func GetSchemaByPath(path string) *Schema { |
no test coverage detected