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

cmd/go: go generate line ending problem #9730

Closed
propag opened this issue Jan 29, 2015 · 5 comments
Closed

cmd/go: go generate line ending problem #9730

propag opened this issue Jan 29, 2015 · 5 comments

Comments

@propag
Copy link

propag commented Jan 29, 2015

on windows line ending (\r\n)
main.go:3: running "go\r": exec: "go\r": executable file not found in %PATH%

on unix line ending (\n), problem not happened

it seems that go generate do not handle line ending appropriately.

@propag propag changed the title go generate line ending problem on windows go generate line ending problem Jan 29, 2015
@adg
Copy link
Contributor

adg commented Jan 29, 2015

Can you please provide main.go?

@adg adg changed the title go generate line ending problem cmd/go: go generate line ending problem Jan 29, 2015
@propag
Copy link
Author

propag commented Jan 30, 2015

Here full main.go

package main

//go:generate go

import "fmt"

func main() {
    fmt.Println("Hello Go World")
}

@adg
Copy link
Contributor

adg commented Jan 30, 2015

I sent this: https://go-review.googlesource.com/3604

@propag do you want to try building Go from source using revision 378716f?

Run:

git clone https://go.googlesource.com/go
git pull origin 378716f886cad106c8b15a55ea9dbc92f57df4a5
cd go/src
./make.bash

And then try running go generate against that file.

@propag
Copy link
Author

propag commented Jan 31, 2015

Good! work nice!

@minux
Copy link
Member

minux commented Jan 31, 2015

This has already been fixed on tip.
This issue is a dup of #9264.

@minux minux closed this as completed Jan 31, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants