spiegel_podman/pkg/emulation/emulation.go
Lokesh Mandvekar 35920891c1
Preallocate slices flagged by prealloc for golangci-lint 2.9.0
golangci-lint 2.9.0 with go 1.26 makes the prealloc linter smarter and flags many slices that can be preallocated with a known capacity. Convert them to make([]T, 0, cap) and drop a now-unused nolint directive.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2026-09-14 08:53:26 -04:00

18 lines
442 B
Go

//go:build !remote
package emulation
import "github.com/sirupsen/logrus"
// Registered returns a list of platforms for which we think we have user
// space emulation available.
func Registered() []string {
binfmt, err := registeredBinfmtMisc()
if err != nil {
logrus.Warnf("registeredBinfmtMisc(): %v", err)
return nil
}
registered := make([]string, 0, len(binfmt))
registered = append(registered, binfmt...)
return registered
}