Correcting all go vet errors
This commit is contained in:
@@ -214,7 +214,7 @@ func (ms *MinionServer) launchHyperkubeServer(server string, args *[]string, log
|
||||
}
|
||||
close(ch)
|
||||
if err := cmd.Wait(); err != nil {
|
||||
log.Error("%v exited with error: %v", server, err)
|
||||
log.Errorf("%v exited with error: %v", server, err)
|
||||
err = fmt.Errorf("%v exited with error: %v", server, err)
|
||||
return err
|
||||
}
|
||||
|
@@ -76,16 +76,16 @@ func (mode RedirectMode) Redirect(nonblock, changemode bool, fd FileDescriptor,
|
||||
// Opens file in read-only, non-blocking mode. Returns a valid fd number if it succeeds, or -1 (and sets errno) if it fails.
|
||||
fdr, e2 := open(name, syscall.O_RDONLY|syscall.O_NONBLOCK, 0)
|
||||
if e2 != nil {
|
||||
return nil, &os.PathError{"open_read", name, e2}
|
||||
return nil, &os.PathError{Op: "open_read", Path: name, Err: e2}
|
||||
}
|
||||
fd2, e = open(name, flags, 0666)
|
||||
fd_close(fdr)
|
||||
}
|
||||
if e != nil {
|
||||
return nil, &os.PathError{"open", name, e}
|
||||
return nil, &os.PathError{Op: "open", Path: name, Err: e}
|
||||
}
|
||||
if e = fd_move(fd, fd2); e != nil {
|
||||
return nil, &os.PathError{"fd_move", name, e}
|
||||
return nil, &os.PathError{Op: "fd_move", Path: name, Err: e}
|
||||
}
|
||||
if changemode {
|
||||
if nonblock {
|
||||
@@ -94,7 +94,7 @@ func (mode RedirectMode) Redirect(nonblock, changemode bool, fd FileDescriptor,
|
||||
e = ndelay_on(fd)
|
||||
}
|
||||
if e != nil {
|
||||
return nil, &os.PathError{"ndelay", name, e}
|
||||
return nil, &os.PathError{Op: "ndelay", Path: name, Err: e}
|
||||
}
|
||||
}
|
||||
return os.NewFile(uintptr(fd2), name), nil
|
||||
|
@@ -1,3 +1,5 @@
|
||||
// +build unit_test
|
||||
|
||||
/*
|
||||
Copyright 2015 The Kubernetes Authors All rights reserved.
|
||||
|
||||
@@ -14,8 +16,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +build unit_test
|
||||
|
||||
package service
|
||||
|
||||
import (
|
||||
|
Reference in New Issue
Block a user