mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
kubectl/cmd: many small refactors
* Rename variables and functions to match Go convention.
For example, UsageError --> UsageErrorf.
* Remove redundant or unreachable code.
* Simplify some utility functions (no functionality changes).
* Fix hanging 'if { return } else { return }' constructs.
* Fix several incorrect printf verbs.
This commit is contained in:
@@ -284,7 +284,7 @@ func testCheckError(t *testing.T, tests []checkErrTestCase) {
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
checkErr("", test.err, errHandle)
|
||||
checkErr(test.err, errHandle)
|
||||
|
||||
if errReturned != test.expectedErr {
|
||||
t.Fatalf("Got: %s, expected: %s", errReturned, test.expectedErr)
|
||||
|
||||
Reference in New Issue
Block a user