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 golang-nuts+unsubscr...@googlegroup
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