cmd/ejobs: remove redundant print statement Refer to review comments in CL 793140. Removing this redundant print statement will prevent a premature return in the event that file closure fails. Change-Id: I43a76096daa858b7c5cc6b4317ab0a5181cb0e33 Reviewed-on: https://go-review.googlesource.com/c/pkgsite-metrics/+/793082 Auto-Submit: Ethan Lee <ethanalee@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/cmd/ejobs/main.go b/cmd/ejobs/main.go index 3929447..b88942b 100644 --- a/cmd/ejobs/main.go +++ b/cmd/ejobs/main.go
@@ -589,13 +589,7 @@ } enc := json.NewEncoder(out) enc.SetIndent("", "\t") - if err := enc.Encode(results); err != nil { - return err - } - if outfile != "" { - fmt.Fprintf(os.Stderr, "Successfully wrote results to %s\n", outfile) - } - return nil + return enc.Encode(results) } bqClient, err := bigquery.NewClientCreate(ctx, projectID, *env)