Fix go vet errors

Close #6269
updated