MCPcopy
hub / github.com/go-gorm/gorm / checkStructRelation

Function checkStructRelation

schema/relationship_test.go:13–21  ·  view source on GitHub ↗
(t *testing.T, data interface{}, relations ...Relation)

Source from the content-addressed store, hash-verified

11)
12
13func checkStructRelation(t *testing.T, data interface{}, relations ...Relation) {
14 if s, err := schema.Parse(data, &sync.Map{}, schema.NamingStrategy{}); err != nil {
15 t.Errorf("Failed to parse schema, got error %v", err)
16 } else {
17 for _, rel := range relations {
18 checkSchemaRelation(t, s, rel)
19 }
20 }
21}
22
23func TestBelongsToOverrideForeignKey(t *testing.T) {
24 type Profile struct {

Calls 2

ParseFunction · 0.92
checkSchemaRelationFunction · 0.85

Tested by

no test coverage detected