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
cmd/go: go generate treats \r as part of command text #9264
Labels
Milestone
Comments
Maybe, your go file may be DOS file format. It should be UNIX file format. |
Ok it works if you run gofmt first. Looks like my editor f*cked this up. The editor replaced the \n with \r\n after it successfully executed gofmt. |
No prob :) |
I believe this is a bug that we should fix. @robpike |
rsc
changed the title
"go generate" directives adds carriage return (U+000D) to command
cmd/go: treats \r as part of command text
Dec 11, 2014
rsc
changed the title
cmd/go: treats \r as part of command text
cmd/go: go generate treats \r as part of command text
Dec 11, 2014
robpike
added a commit
that referenced
this issue
Feb 17, 2015
Remove carriage returns from //go:generate lines. Carriage returns are the predecessor of BOMs and still live on Windows. Fixes #9264 Change-Id: I637748c74335c696b3630f52f2100061153fcdb4 Reviewed-on: https://go-review.googlesource.com/1564 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> (cherry picked from commit fde3ab8) Reviewed-on: https://go-review.googlesource.com/4999 Reviewed-by: David Symonds <dsymonds@golang.org>
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 25, 2018
Remove carriage returns from //go:generate lines. Carriage returns are the predecessor of BOMs and still live on Windows. Fixes golang#9264 Change-Id: I637748c74335c696b3630f52f2100061153fcdb4 Reviewed-on: https://go-review.googlesource.com/1564 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> (cherry picked from commit fde3ab8) Reviewed-on: https://go-review.googlesource.com/4999 Reviewed-by: David Symonds <dsymonds@golang.org>
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 26, 2018
Remove carriage returns from //go:generate lines. Carriage returns are the predecessor of BOMs and still live on Windows. Fixes golang#9264 Change-Id: I637748c74335c696b3630f52f2100061153fcdb4 Reviewed-on: https://go-review.googlesource.com/1564 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> (cherry picked from commit fde3ab8) Reviewed-on: https://go-review.googlesource.com/4999 Reviewed-by: David Symonds <dsymonds@golang.org>
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 9, 2018
Remove carriage returns from //go:generate lines. Carriage returns are the predecessor of BOMs and still live on Windows. Fixes golang#9264 Change-Id: I637748c74335c696b3630f52f2100061153fcdb4 Reviewed-on: https://go-review.googlesource.com/1564 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> (cherry picked from commit fde3ab8) Reviewed-on: https://go-review.googlesource.com/4999 Reviewed-by: David Symonds <dsymonds@golang.org>
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 20, 2018
Remove carriage returns from //go:generate lines. Carriage returns are the predecessor of BOMs and still live on Windows. Fixes golang#9264 Change-Id: I637748c74335c696b3630f52f2100061153fcdb4 Reviewed-on: https://go-review.googlesource.com/1564 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> (cherry picked from commit fde3ab8) Reviewed-on: https://go-review.googlesource.com/4999 Reviewed-by: David Symonds <dsymonds@golang.org>
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 30, 2018
Remove carriage returns from //go:generate lines. Carriage returns are the predecessor of BOMs and still live on Windows. Fixes golang#9264 Change-Id: I637748c74335c696b3630f52f2100061153fcdb4 Reviewed-on: https://go-review.googlesource.com/1564 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> (cherry picked from commit fde3ab8) Reviewed-on: https://go-review.googlesource.com/4999 Reviewed-by: David Symonds <dsymonds@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Just tested the new "go generate" command. I'm using a windows machine and so my line endings are \r\n and not just \n.
so if I put "//go:generate dosomething" in my source code and run "go generate" it executed "dosomething\r" which can not be found. (Tested with go1.4.windows-amd64 release)
Sorry for submitting if this is expected behavior...
The text was updated successfully, but these errors were encountered: