Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use a more specific error type for no container info #1115

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

MorrisLaw
Copy link
Contributor

This PR adds a new error type to when ContainerInfo comes back nil while verifying the configuration. It currently returns errorInvalidConfig, this change will return errorNoContainerInfo instead. Similar to how we return errorNoImageInfo when ImageInfo is nil.

@MorrisLaw MorrisLaw requested a review from simskij as a code owner October 31, 2021 07:13
@codecov
Copy link

codecov bot commented Oct 31, 2021

Codecov Report

Merging #1115 (1c93c5f) into main (3bf9340) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1115   +/-   ##
=======================================
  Coverage   61.96%   61.96%           
=======================================
  Files          22       22           
  Lines        1438     1438           
=======================================
  Hits          891      891           
  Misses        463      463           
  Partials       84       84           
Impacted Files Coverage Δ
pkg/container/container.go 45.36% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bf9340...1c93c5f. Read the comment docs.

Copy link
Member

@piksel piksel left a comment

Choose a reason for hiding this comment

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

Can't argue with being more specific in error messages. Thanks!

Not so sure I'd call it a refactor though... 😅

@piksel piksel changed the title refactor: add a more specific type for no container info error feat: use a more specific error type for no container info Nov 12, 2021
@piksel piksel merged commit d9d6f79 into containrrr:main Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants