Skip to content

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