thanks Dave. This is to test a code generation utility during development, 
so not to build/install etc, but run directly. thanks again for your help.

On Thursday, January 5, 2017 at 12:07:55 AM UTC-5, Dave Cheney wrote:
>
>  go run cmd/main.go -- tests/a/in.go
>
> But you've probably reached the practical limit of what go run should be 
> used for. I recommend using the expected GOPATH package layout, go 
> build/install, etc.
>
> On Thursday, 5 January 2017 16:02:50 UTC+11, bsr wrote:
>>
>> 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 argument 
>> to the built program at cmd/main.go
>>
>>
>> tried like
>>
>>
>> go run cmd/main.go "tests/a/in.go" , but same error.
>>
>>
>> thanks.
>>
>

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to