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

Golang: build from cmd applications if main.go isn't available in the root #1227

Open
jaredLunde opened this issue Nov 19, 2024 · 0 comments · May be fixed by #1232
Open

Golang: build from cmd applications if main.go isn't available in the root #1227

jaredLunde opened this issue Nov 19, 2024 · 0 comments · May be fixed by #1232

Comments

@jaredLunde
Copy link

Feature request

I'd like to add more coverage for standard Golang applications by checking for the existence of a cmd directory if main.go is missing

  1. Check for main.go
  2. If main.go doesn't exist, check cmd for *.go file. If located, go build ./cmd
  3. If cmd/*.go doesn't exist, build the first directory in cmd with go build ./cmd/[directory]

https://github.com/railwayapp/nixpacks/blob/main/src/providers/go.rs#L75-L79

Motivation

My Go apps fail on the first build so I have to add a custom build command for each one

Contribution

I can submit a PR : )

@jaredLunde jaredLunde linked a pull request Dec 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant