On Tuesday, 20 April 2021 at 20:28:56 UTC+1 [email protected] wrote:

> And I notice only now that you can do `go build -o "" ./...`.
>

But does that work?  See 
https://github.com/golang/go/blob/master/src/cmd/go/internal/work/build.go#L374-L377

Testing with go 1.16.3 shows that it doesn't:

MacBook-Pro-4:simpletest $ ls
go.mod main.go
MacBook-Pro-4:simpletest $ go build -o "" ./...
MacBook-Pro-4:simpletest $ ls
go.mod main.go simpletest

However, *-o /dev/null* does work:

MacBook-Pro-4:simpletest $ rm simpletest
MacBook-Pro-4:simpletest $ go build -o /dev/null ./...
MacBook-Pro-4:simpletest $ ls
go.mod main.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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c4acf853-c4af-47a8-9bfd-d839bc8fa5afn%40googlegroups.com.

Reply via email to