Fix several issues with `go vet` and `gofmt -s` Upstream-commit: 22dccaf2d6503e141e48ae3d9f3edc7ace946bbd Component: engine