Skip to content

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 <robert.gogolok@stackit.cloud>
@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
5 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