[go-nuts] How to pass a go file name as arguments to go run

2017-01-05 Thread Mandolyte
Pass as a value to a named argument: go run cmd/main.go -input tests/dir/a.go -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[go-nuts] How to pass a go file name as arguments to go run

2017-01-04 Thread bsr
Following works. go run cmd/main.go tests/a/in flag.Parse() args := flag.Args() //args -> []string{"tests/a/in"} but when I do go run cmd/main.go tests/a/in.go named files must all be in one directory; have cmd/ and tests/a/ I am not trying to build both files, but "tests/a/in.go: is an