MCPcopy Create free account
hub / github.com/cloudwan/gohan / GetSchemaByURLPath

Function GetSchemaByURLPath

schema/schema.go:512–519  ·  view source on GitHub ↗

GetSchemaByURLPath - gets schema by resource path (from API)

(path string)

Source from the content-addressed store, hash-verified

510
511//GetSchemaByURLPath - gets schema by resource path (from API)
512func 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
522func GetSchemaByPath(path string) *Schema {

Callers 1

schema_test.goFile · 0.85

Calls 2

GetManagerFunction · 0.70
SchemasMethod · 0.65

Tested by

no test coverage detected