Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
  • Loading branch information
simonferquel committed Dec 17, 2018
1 parent 3662466 commit c0c24d9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cli/command/context/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,14 @@ func writeTo(dockerCli command.Cli, reader io.Reader, dest string) error {
if dest == "-" {
_, err := io.Copy(dockerCli.Out(), reader)
return err
} else {
f, err := os.OpenFile(dest, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
return err
}
defer f.Close()
_, err = io.Copy(f, reader)
}
f, err := os.OpenFile(dest, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
return err
}
defer f.Close()
_, err = io.Copy(f, reader)
return err
}

func runExport(dockerCli command.Cli, opts *exportOptions) error {
Expand Down

0 comments on commit c0c24d9

Please sign in to comment.