Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Fail on no entrypoint, don't crash #16

Merged
merged 2 commits into from
Nov 13, 2017
Merged

Fail on no entrypoint, don't crash #16

merged 2 commits into from
Nov 13, 2017

Conversation

sargun
Copy link
Contributor

@sargun sargun commented Nov 10, 2017

No description provided.

Copy link
Contributor

@fabiokung fabiokung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good overall, with some cosmetic changes.

log.Errorf("Error in inspecting docker image %s : %v\n", image, err)
return 0
}
func (r *DockerRuntime) reportDockerImageSizeMetric(c *Container, imageInfo types.ImageInspect, image string) int64 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused image argument

return true
}

if imageInfo.Config.Entrypoint != nil || imageInfo.Config.Cmd != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactor this if-else chain into return imageInfo.Config.Entrypoint != nil || imageInfo.Config.Cmd != nil

@sargun sargun merged commit 9fa9e62 into master Nov 13, 2017
@sargun sargun deleted the fail-on-no-entrypoint branch November 13, 2017 20:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants