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

Use unix build constraint #1432

Merged
merged 1 commit into from
Dec 3, 2024
Merged

Conversation

gogolok
Copy link
Contributor

@gogolok gogolok commented Dec 2, 2024

Summary

Simplify go:build constraint linux || darwin to unix. This can potentially support also constraint freebsd in the future.

The constraint unix is available since Go 1.19: https://tip.golang.org/doc/go1.19#go-unix

File name suffixes (filename_unix.go, filename_windows.go, filename_linux.go ...) are also available and being used in this project, but I'm not sure whether one should do both (go:build and file name suffixes) OR not. But it seems like go:build takes precedence.

Related

Kind of related: #1271

Context

I'm working on getting support for FreeBSD. This patch helps to simplify the code base so that the diff for FreeBSD support gets smaller.

Signed-off-by: Robert Gogolok <[email protected]>
@gogolok gogolok requested a review from a team as a code owner December 2, 2024 22:33
@jabrown85 jabrown85 merged commit 564dcd3 into buildpacks:main Dec 3, 2024
7 checks passed
@gogolok gogolok deleted the go_build_unix branch December 3, 2024 14:59
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 this pull request may close these issues.

2 participants