On 20 Jan 2019, at 20:20, Tycho Andersen
mailto:ty...@tycho.ws>> wrote:
That's how I have it now. The problem with this is that in the face of
modules, it re-writes the go.mod and go.sum files to not include the
deps of the binary it's not currently building, so you end up with a
bunch of
On Sun, Jan 20, 2019 at 11:20 AM Tycho Andersen wrote:
> On Sun, Jan 20, 2019 at 11:18:38AM -0800, Jinwoo Lee wrote:
> > It looks like "go build ./cmd/..." works when there's only one directory
> > under cmd. When there are multiple directories there, the command doesn't
> > generate any
On Sun, Jan 20, 2019 at 11:33 AM Jan Mercl <0xj...@gmail.com> wrote:
>
>
>
> On Sun, Jan 20, 2019 at 8:22 PM Jinwoo Lee wrote:
>
> > It looks like "go build ./cmd/..." works when there's only one directory
> under cmd. When there are multiple directories there, the command doesn't
> generate any
On Sun, Jan 20, 2019 at 8:22 PM Jinwoo Lee wrote:
> It looks like "go build ./cmd/..." works when there's only one directory
under cmd. When there are multiple directories there, the command doesn't
generate any binaries for me.
It works on all sub directories. But `go build` puts the binary
It looks like "go build ./cmd/..." works when there's only one directory
under cmd. When there are multiple directories there, the command doesn't
generate any binaries for me.
I would just do
$ go build ./cmd/foo
$ go build ./cmd/bar
They create binaries in the current directory so you don't
On Sun, Jan 20, 2019 at 11:18:38AM -0800, Jinwoo Lee wrote:
> It looks like "go build ./cmd/..." works when there's only one directory
> under cmd. When there are multiple directories there, the command doesn't
> generate any binaries for me.
>
> I would just do
>
> $ go build ./cmd/foo
> $ go
On Fri, Jan 18, 2019 at 09:54:51PM -0500, Ian Denhardt wrote:
> You could just do:
>
> go build ./cmd/...
> cp ./cmd/foo/foo ./
> cp ./cmd/bar/bar ./
>
> ..and wrap it up in a script.
go build doesn't seem to produce binaries, though? In any case, Paul's
suggestion in a sibling mail works well
Perhaps the most idiomatic way of achieving this is:
GOBIN=$PWD go install ./cmd/{foo,bar}
go install is also more efficient than go build because it will only
perform the link step if the target is out of date.
I'm no expert with make, so I don't know how this sort of approach
maps back onto
You could just do:
go build ./cmd/...
cp ./cmd/foo/foo ./
cp ./cmd/bar/bar ./
..and wrap it up in a script.
Quoting Tycho Andersen (2019-01-17 17:47:35)
> Hi everyone,
>
> I'm trying to get an existing project which outputs multiple binaries
> to work with go modules. The package follows