go1.20+: Refuse to work if cgo is enabled
On go1.20+ it is no longer possible to directly copy a cgo-enabled library into a docker container. For this reason, this commit adds a flag to commands that automatically make them fail with an appropriate message if cgo is enabled.
This commit is contained in:
parent
5e9795ad0c
commit
6362b2887b
9 changed files with 30 additions and 10 deletions
|
|
@ -9,6 +9,9 @@ import (
|
|||
type Requirements struct {
|
||||
// Do we need an installed distillery?
|
||||
NeedsDistillery bool
|
||||
|
||||
// Automatically fail when cgo is enabled?
|
||||
FailOnCgo bool
|
||||
}
|
||||
|
||||
// AllowsFlag checks if the provided flag may be passed to fullfill this requirement
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue