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

restore: Add --replace option to automatically overwrite existing container of the same name #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andrewleech
Copy link

Can be quite helpful during testing after #21

// io.Copy(os.Stdout, reader)

_, err = cli.ContainerInspect(ctx, name)
if err == nil {
Copy link
Owner

Choose a reason for hiding this comment

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

See my comment on #23: try to keep the happy path on the left edge. Check for an error and bail out immediately, then keep the rest of the code on the left edge.

Related: what happens in case of an error here? Shouldn't we return it?

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.

3 participants