Skip to content

Commit

Permalink
cmd/gotext: fix "go format failed: invalid argument"
Browse files Browse the repository at this point in the history
Fixes golang/go#26897

Change-Id: Ie47e648f02f2b1ed20e72ab6a05035f91e4635fc
Reviewed-on: https://go-review.googlesource.com/128795
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
  • Loading branch information
beono authored and bradfitz committed Aug 9, 2018
1 parent 17ff2d5 commit 5bceb69
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/gotext/rewrite.go
Expand Up @@ -5,6 +5,7 @@
package main

import (
"io"
"os"

"golang.org/x/text/message/pipeline"
Expand Down Expand Up @@ -39,9 +40,9 @@ using Printf to allow translators to reorder arguments.
}

func runRewrite(cmd *Command, _ *pipeline.Config, args []string) error {
w := os.Stdout
if *overwrite {
w = nil
var w io.Writer
if !*overwrite {
w = os.Stdout
}
pkg := "."
switch len(args) {
Expand Down

0 comments on commit 5bceb69

Please sign in to comment.