@@ -3,7 +3,7 @@ package diff
3
3
import "cosmossdk.io/schema"
4
4
5
5
// FieldDiff represents the difference between two fields.
6
- // The KindChanged, NullableChanged, and ReferenceTypeChanged methods can be used to determine
6
+ // The KindChanged, NullableChanged, and ReferenceableTypeChanged methods can be used to determine
7
7
// what specific changes were made to the field.
8
8
type FieldDiff struct {
9
9
// Name is the name of the field.
@@ -22,11 +22,11 @@ type FieldDiff struct {
22
22
NewNullable bool
23
23
24
24
// OldReferencedType is the name of the old referenced type.
25
- // It will be empty if the field is not a reference type or if there was no change.
25
+ // It will be empty if the field is not a referenceable type or if there was no change.
26
26
OldReferencedType string
27
27
28
28
// NewReferencedType is the name of the new referenced type.
29
- // It will be empty if the field is not a reference type or if there was no change.
29
+ // It will be empty if the field is not a referenceable type or if there was no change.
30
30
NewReferencedType string
31
31
}
32
32
@@ -52,7 +52,7 @@ func compareField(oldField, newField schema.Field) FieldDiff {
52
52
53
53
// Empty returns true if the field diff has no changes.
54
54
func (d FieldDiff ) Empty () bool {
55
- return ! d .KindChanged () && ! d .NullableChanged () && ! d .ReferenceTypeChanged ()
55
+ return ! d .KindChanged () && ! d .NullableChanged () && ! d .ReferenceableTypeChanged ()
56
56
}
57
57
58
58
// KindChanged returns true if the field kind changed.
@@ -65,7 +65,7 @@ func (d FieldDiff) NullableChanged() bool {
65
65
return d .OldNullable != d .NewNullable
66
66
}
67
67
68
- // ReferenceTypeChanged returns true if the referenced type changed.
69
- func (d FieldDiff ) ReferenceTypeChanged () bool {
68
+ // ReferenceableTypeChanged returns true if the referenced type changed.
69
+ func (d FieldDiff ) ReferenceableTypeChanged () bool {
70
70
return d .OldReferencedType != d .NewReferencedType
71
71
}
0 commit comments