chore: update go-zero version (#5093)

Signed-off-by: kevin <wanjunfeng@gmail.com>
This commit is contained in:
Kevin Wan
2025-08-17 17:00:15 +08:00
committed by GitHub
parent a5d42e20d5
commit a81d898408
16 changed files with 99 additions and 107 deletions

View File

@@ -81,7 +81,7 @@ func Parse(filename, database string, strict bool) ([]*Table, error) {
for indexTable, e := range tables {
var (
primaryColumn string
primaryColumnSet = collection.NewSet()
primaryColumnSet = collection.NewSet[string]()
uniqueKeyMap = make(map[string][]string)
// Unused local variable
// normalKeyMap = make(map[string][]string)
@@ -91,7 +91,7 @@ func Parse(filename, database string, strict bool) ([]*Table, error) {
for _, column := range columns {
if column.Constraint != nil {
if column.Constraint.Primary {
primaryColumnSet.AddStr(column.Name)
primaryColumnSet.Add(column.Name)
}
if column.Constraint.Unique {
@@ -113,7 +113,7 @@ func Parse(filename, database string, strict bool) ([]*Table, error) {
if len(e.ColumnPrimaryKey) == 1 {
primaryColumn = e.ColumnPrimaryKey[0]
primaryColumnSet.AddStr(e.ColumnPrimaryKey[0])
primaryColumnSet.Add(e.ColumnPrimaryKey[0])
}
if len(e.ColumnUniqueKey) > 0 {
@@ -173,7 +173,7 @@ func Parse(filename, database string, strict bool) ([]*Table, error) {
func checkDuplicateUniqueIndex(uniqueIndex map[string][]*Field, tableName string) {
log := console.NewColorConsole()
uniqueSet := collection.NewSet()
uniqueSet := collection.NewSet[string]()
for k, i := range uniqueIndex {
var list []string
for _, e := range i {
@@ -187,7 +187,7 @@ func checkDuplicateUniqueIndex(uniqueIndex map[string][]*Field, tableName string
continue
}
uniqueSet.AddStr(joinRet)
uniqueSet.Add(joinRet)
}
}
@@ -311,7 +311,7 @@ func ConvertDataType(table *model.Table, strict bool) (*Table, error) {
return reply.Fields[i].OrdinalPosition < reply.Fields[j].OrdinalPosition
})
uniqueIndexSet := collection.NewSet()
uniqueIndexSet := collection.NewSet[string]()
log := console.NewColorConsole()
for indexName, each := range table.UniqueIndex {
sort.Slice(each, func(i, j int) bool {
@@ -342,7 +342,7 @@ func ConvertDataType(table *model.Table, strict bool) (*Table, error) {
continue
}
uniqueIndexSet.AddStr(uniqueKey)
uniqueIndexSet.Add(uniqueKey)
reply.UniqueIndex[indexName] = list
}