Peter - Yep, with a little more experimentation I just found that out. Either result can be reproduced.
Guy On Tuesday, April 18, 2017 at 9:06:41 AM UTC-4, peterGo wrote: > > Guy, > > It's easy to get any result you want: same case, different case. It's an > easyjson problem. > > Peter > > On Tuesday, April 18, 2017 at 8:55:03 AM UTC-4, Guy Allard wrote: >> >> I do net see that here. C: is uppercase in both cases. >> >> go 1.8 >> Win 7 >> >> On Monday, April 17, 2017 at 11:06:50 AM UTC-4, Andreas Reuterberg wrote: >>> >>> I'm calling os.Getwd() as part of a very simple test, but I get >>> different responses >>> depending on if I'm executing the test as a binary or not. The windows >>> drive is >>> upper case when executing the test as a binary even when GOPATH uses >>> a lower case drive. >>> >>> >>> package main >>> >>> import ( >>> "fmt" >>> "os" >>> "testing" >>> ) >>> >>> func TestWd(t *testing.T) { >>> w, _ := os.Getwd() >>> fmt.Println(w) >>> } >>> >>> >>> set GOPATH=c:\code\projects\go >>> go test . -v >>> >>> Outputs: >>> c:\code\projects\go\src\bitbucket.org\flat20\temp >>> >>> go test -c >>> temp.test.exe >>> >>> Outputs: >>> C:\code\projects\go\src\bitbucket.org\flat20\temp >>> >>> >>> However, if I set my GOPATH using an upper case drive letter, it all >>> works out >>> as expected. Should GOPATH always use an upper case drive letter? Should >>> the test binary work differently to a command line "go test"? >>> >>> Regards, >>> Andreas >>> >>> >>> >>> -- 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.