Skip to content

Conversation

@julienschmidt
Copy link
Member

No description provided.

infile.go Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Considering it's also used below (line 112), I think we should introduce

func deferredClose(err *error, closer io.Closer) {
    closeErr := closer.Close()
    if *err == nil {
        *err = closeErr
    }
}

and use that for the defer. The function does not bind local vars, it gets passed a pointer. It's shorter and more general.

@arnehormann
Copy link
Member

LGTM after addressing comment

@julienschmidt
Copy link
Member Author

PTAL

@arnehormann
Copy link
Member

LGTM

julienschmidt added a commit that referenced this pull request Nov 16, 2013
@julienschmidt julienschmidt merged commit 5d25a76 into master Nov 16, 2013
@julienschmidt julienschmidt deleted the infile branch November 16, 2013 14:05
@julienschmidt julienschmidt added this to the v1.2 milestone Apr 1, 2014
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