• Joe Tsai's avatar
    archive/tar: make Writer error handling consistent · b9a79f32
    Joe Tsai authored
    The Writer logic was not consistent about when an IO error would
    persist across multiple calls on Writer's methods.
    
    Thus, to make the error handling more consistent we always check
    the persistent state of the error prior to every exported method
    call, and return an error if set. Otherwise, it is the responsibility
    of every exported method to persist any fatal errors that may occur.
    
    As a simplification, we can remove the close field since that
    information can be represented by simply storing ErrWriteAfterClose
    in the err field.
    
    Change-Id: I8746ca36b3739803e0373253450db69b3bd12f38
    Reviewed-on: https://go-review.googlesource.com/55590
    Run-TryBot: Joe Tsai <joetsai@digital-static.net>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    b9a79f32
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...