Skip to content

Commit 5c311b2

Browse files
committed
feat:Capitalize the priority field of IndexOption so that other systems can access this field from outside the package.
1 parent f482f25 commit 5c311b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

schema/index.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type IndexOption struct {
2323
Sort string // DESC, ASC
2424
Collate string
2525
Length int
26-
priority int
26+
Priority int
2727
}
2828

2929
// ParseIndexes parse schema indexes
@@ -64,7 +64,7 @@ func (schema *Schema) ParseIndexes() []*Index {
6464

6565
idx.Fields = append(idx.Fields, index.Fields...)
6666
sort.Slice(idx.Fields, func(i, j int) bool {
67-
return idx.Fields[i].priority < idx.Fields[j].priority
67+
return idx.Fields[i].Priority < idx.Fields[j].Priority
6868
})
6969
}
7070
}
@@ -155,7 +155,7 @@ func parseFieldIndexes(field *Field) (indexes []Index, err error) {
155155
Sort: settings["SORT"],
156156
Collate: settings["COLLATE"],
157157
Length: length,
158-
priority: priority,
158+
Priority: priority,
159159
}},
160160
})
161161
}

0 commit comments

Comments
 (0)