mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-08 06:57:39 +00:00
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>
18 lines
442 B
Go
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
|
|
}
|