Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/text: "gotext rewrite -w" returns "go format failed: invalid argument" #26897

Closed
beono opened this issue Aug 9, 2018 · 2 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@beono
Copy link

beono commented Aug 9, 2018

What version of Go are you using (go version)?

go version go1.10.3 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/erakhimberdin/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/erakhimberdin/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/tq/qs59s2zx57n1hw6m566m81r00000gp/T/go-build616589450=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

go get -u golang.org/x/text
cd $GOPATH/src/golang.org/x/text/cmd/gotext/examples/rewrite/
go run ../../*.go rewrite -w

What did you expect to see?

Rewritten file $GOPATH/src/golang.org/x/text/cmd/gotext/examples/rewrite/main.go

What did you see instead?

$GOPATH/src/golang.org/x/text/cmd/gotext/examples/rewrite/main.go wasn't changed.

gotext: go format failed: invalid argument
exit status 1

CC @mpvl

@agnivade agnivade changed the title "gotext rewrite -w" returns "go format failed: invalid argument" x/text: "gotext rewrite -w" returns "go format failed: invalid argument" Aug 9, 2018
@gopherbot gopherbot added this to the Unreleased milestone Aug 9, 2018
@agnivade agnivade added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 9, 2018
@gopherbot
Copy link

Change https://golang.org/cl/128795 mentions this issue: cmd/gotext: fix "go format failed: invalid argument"

@beono
Copy link
Author

beono commented Aug 9, 2018

I've fixed it here https://go-review.googlesource.com/c/text/+/128795

@golang golang locked and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants