go build v go build .

96 views
Skip to first unread message

Steve Mynott

unread,
Apr 24, 2024, 1:25:24 PM4/24/24
to golang-nuts
Is there any difference between "go build" and "go build ."?

--
Steve Mynott <steve....@gmail.com>
rsa3072/629FBB91565E591955B5876A79CEFAA4450EBD50

Henrique Gogó

unread,
Apr 24, 2024, 2:27:08 PM4/24/24
to Steve Mynott, golang-nuts
On Wed, Apr 24, 2024 at 06:24:33PM +0100, Steve Mynott wrote:
> Is there any difference between "go build" and "go build ."?

The last param of "go build" is the package to build. If you don't specify
anything, it builds the package in the current directory.

In you second case, it builds the current directory, so effectively, it's
just like the first case.

So no, there's no difference.

Henrique
Reply all
Reply to author
Forward
0 new messages