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
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
Hi everyone,
I'm trying to get an existing project which outputs multiple binaries
to work with go modules. The package follows roughly the recommended
layout: https://github.com/golang-standards/project-layout
That is, it looks like
/go.mod
/go.sum
/code.go
/cmd/foo/main.go
/cmd/bar/main.go
I