perf: use strings.IndexByte to replace strings.Index (#7454)
Co-authored-by: 1911860538 <alxps1911@gmail.com>
This commit is contained in:
parent
1c966e0d25
commit
9703eb775f
@ -105,7 +105,7 @@ func parseFieldIndexes(field *Field) (indexes []Index, err error) {
|
||||
var (
|
||||
name string
|
||||
tag = strings.Join(v[1:], ":")
|
||||
idx = strings.Index(tag, ",")
|
||||
idx = strings.IndexByte(tag, ',')
|
||||
tagSetting = strings.Join(strings.Split(tag, ",")[1:], ",")
|
||||
settings = ParseTagSetting(tagSetting, ",")
|
||||
length, _ = strconv.Atoi(settings["LENGTH"])
|
||||
|
@ -675,7 +675,7 @@ func (rel *Relationship) ParseConstraint() *Constraint {
|
||||
|
||||
var (
|
||||
name string
|
||||
idx = strings.Index(str, ",")
|
||||
idx = strings.IndexByte(str, ',')
|
||||
settings = ParseTagSetting(str, ",")
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user