MM-23747 fix Sprintf linter errors (#14196)
- replace all instances of `fmt.Sprintf("whatever")` with simply "whatever".
- replace all instances of `fmt.Println(fmt.Sprintf("whatever %d", i))` with `fmt.Printf("whatever %d\n", i)`
Этот коммит содержится в:
@@ -25,8 +25,8 @@ func init() {
|
||||
}
|
||||
|
||||
func printRelationalIntegrityCheckResult(data store.RelationalIntegrityCheckData, verbose bool) {
|
||||
fmt.Println(fmt.Sprintf("Found %d records in relation %s orphans of relation %s",
|
||||
len(data.Records), data.ChildName, data.ParentName))
|
||||
fmt.Printf("Found %d records in relation %s orphans of relation %s\n",
|
||||
len(data.Records), data.ChildName, data.ParentName)
|
||||
if !verbose {
|
||||
return
|
||||
}
|
||||
@@ -43,15 +43,15 @@ func printRelationalIntegrityCheckResult(data store.RelationalIntegrityCheckData
|
||||
|
||||
if record.ChildId != nil {
|
||||
if parentId == "NULL" || parentId == "empty" {
|
||||
fmt.Println(fmt.Sprintf(" Child %s (%s.%s) has %s ParentIdAttr (%s.%s)", *record.ChildId, data.ChildName, data.ChildIdAttr, parentId, data.ChildName, data.ParentIdAttr))
|
||||
fmt.Printf(" Child %s (%s.%s) has %s ParentIdAttr (%s.%s)\n", *record.ChildId, data.ChildName, data.ChildIdAttr, parentId, data.ChildName, data.ParentIdAttr)
|
||||
} else {
|
||||
fmt.Println(fmt.Sprintf(" Child %s (%s.%s) is missing Parent %s (%s.%s)", *record.ChildId, data.ChildName, data.ChildIdAttr, parentId, data.ChildName, data.ParentIdAttr))
|
||||
fmt.Printf(" Child %s (%s.%s) is missing Parent %s (%s.%s)\n", *record.ChildId, data.ChildName, data.ChildIdAttr, parentId, data.ChildName, data.ParentIdAttr)
|
||||
}
|
||||
} else {
|
||||
if parentId == "NULL" || parentId == "empty" {
|
||||
fmt.Println(fmt.Sprintf(" Child has %s ParentIdAttr (%s.%s)", parentId, data.ChildName, data.ParentIdAttr))
|
||||
fmt.Printf(" Child has %s ParentIdAttr (%s.%s)\n", parentId, data.ChildName, data.ParentIdAttr)
|
||||
} else {
|
||||
fmt.Println(fmt.Sprintf(" Child is missing Parent %s (%s.%s)", parentId, data.ChildName, data.ParentIdAttr))
|
||||
fmt.Printf(" Child is missing Parent %s (%s.%s)\n", parentId, data.ChildName, data.ParentIdAttr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user