We should have go vet integrated into the build process. It should be a make target.
We should also fix all the errors that are currently surfaced by go vet. See log snippet below.
Supporting Log Snippets
running go vet ./... yields a few suggestions:
# github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/docker [github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/docker.test]
BUILD/ecs-init-1.33.0/ecs-init/docker/docker_unspecified.go:48:3: cannot use logConfig (type "github.com/aws/amazon-ecs-init/ecs-init/vendor/github.com/fsouza/go-dockerclient".LogConfig) as type "github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/vendor/github.com/fsouza/go-dockerclient".LogConfig in field value
# github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/engine [github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/engine.test]
BUILD/ecs-init-1.33.0/ecs-init/engine/engine_test.go:166:41: cannot use mockCtrl (type *"github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/vendor/github.com/golang/mock/gomock".Controller) as type *"github.com/aws/amazon-ecs-init/ecs-init/vendor/github.com/golang/mock/gomock".Controller in argument to gpu.NewMockGPUManager
BUILD/ecs-init-1.33.0/ecs-init/engine/engine_test.go:200:41: cannot use mockCtrl (type *"github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/vendor/github.com/golang/mock/gomock".Controller) as type *"github.com/aws/amazon-ecs-init/ecs-init/vendor/github.com/golang/mock/gomock".Controller in argument to gpu.NewMockGPUManager
# github.com/aws/amazon-ecs-init/ecs-init/engine
ecs-init/engine/engine.go:219: unreachable code
Summary
We should have go vet integrated into the build process. It should be a make target. We should also fix all the errors that are currently surfaced by go vet. See log snippet below.
Supporting Log Snippets
running go vet ./... yields a few suggestions: