remove legacy build-tags#5904
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5904 +/- ##
=======================================
Coverage 59.26% 59.26%
=======================================
Files 357 357
Lines 29771 29771
=======================================
Hits 17645 17645
Misses 11153 11153
Partials 973 973 🚀 New features to boost your workflow:
|
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
b1cb710 to
f6d49e9
Compare
| @@ -1,5 +1,4 @@ | |||
| //go:build unix | |||
| // +build unix | |||
| //go:build !windows | |||
There was a problem hiding this comment.
!windows is a lot broader than just unix. The package used here is golang.org/x/sys/unix which I assume supports all unix systems, but it's unclear to me if !windows would be too broad for it, wdyt?
There was a problem hiding this comment.
In this case we mostly care about complementing the _windows file, so it's fine.
If someone attempts to build the CLI for such platform, I don't think it makes much difference if they would get an TerminationSignals is undefined vs package unix doesn't provide SIGTERM/SIGINT.
There was a problem hiding this comment.
I originally removed the build-tag, but forgot that unix is "special" in Go, because for backward-compatibility, they didn't add support for _unix.go as suffix (as they do for other build-tags, like _windows.go.
I can add a signals_other.go or signals_unsupported.go instead that defines an empty slice instead?
var TerminationSignals = []os.Signal{}or
var TerminationSignals []os.Signal@Benehiko let me know what you prefer 👍
There was a problem hiding this comment.
Ah, I also just realised that this is an internal package inside cmd/docker, so really only for building the binary, and not to be used by anyone else, so probably should be fine yes.
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)