Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: go build target with makefile #49

Merged
merged 2 commits into from
Aug 10, 2022
Merged

fix: go build target with makefile #49

merged 2 commits into from
Aug 10, 2022

Conversation

yitsushi
Copy link
Contributor

With go build we can't specify more than one binaries to build. Go
will not know what to do with them. It feels logical to assume it will
build a binary with the same name as the package defined, but

  1. You can specify -o flag and it can only be one.
  2. You can have different modules with the same name like cmd/mybin
    and extra/mybin.

To prevent polluting the root of the repo, I moved all binary under
the bin/ directory.


With `go build` we can't specify more than one binaries to build. Go
will not know what to do with them. It feels logical to assume it will
build a binary with the same name as the package defined, but
1. You can specify `-o` flag and it can only be one.
2. You can have different modules with the same name like `cmd/mybin`
   and `extra/mybin`.

To prevent polluting the root of the repo, I moved all binary under
the `bin/` directory.
@gardener-robot
Copy link
Contributor

@yitsushi Thank you for your contribution.

@yitsushi yitsushi merged commit 99683b9 into main Aug 10, 2022
@phoban01 phoban01 deleted the fix-makefile branch November 25, 2022 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants