fix: properly handle rows.Err() (#4261)
* fix (auth): properly handle rows.Err() * fix (auth/ldap): properly handle rows.Err() * fix (auth/oidc): properly handle rows.Err() * fix (auth/password): properly handle rows.Err() * fix (authtoken): properly handle rows.Err() * fix (credential): properly handle rows.Err() * fix (credential/static): properly handle rows.Err() * fix (credential/vault): properly handle rows.Err() * fix (db): properly handle rows.Err() * fix (db/schema): properly handle rows.Err() * fix (db/migrations): properly handle rows.Err() * fix (host): properly handle rows.Err() * fix (host/plugin): properly handle rows.Err() * fix (host/static): properly handle rows.Err() * fix (iam): properly handle rows.Err() * fix (kms): properly handle rows.Err() * fix (oplog): properly handle rows.Err() * fix (pagination/purge): properly handle rows.Err() * fix (plugin): properly handle rows.Err() * fix (job/scheduler): properly handle rows.Err() * fix (server): properly handle rows.Err() * fix (session): properly handle rows.Err() * fix (target): properly handle rows.Err()
This commit is contained in:
59 files changed
+252
-2
No files matched your search
@@ -87,6 +87,9 @@ func ExampleManager_hooks() {
|
||||
}
|
||||
invalid = append(invalid, fmt.Sprintf("%d:%s", id, name))
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(invalid) > 0 {
|
||||
return append([]string{"invalid foos:"}, invalid...), nil
|
||||
@@ -116,6 +119,9 @@ func ExampleManager_hooks() {
|
||||
}
|
||||
invalid = append(invalid, fmt.Sprintf("%d:%s", id, name))
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(invalid) > 0 {
|
||||
return append([]string{"deleted foos:"}, invalid...), nil
|
||||
|
||||
Reference in new issue
Block a user