From 587cec15e23ecafc9b00f8ae775a98d0e4803997 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 15 Nov 2019 11:42:18 +0100 Subject: pkg/host: add Features.Supported To reduce diff in future changes. Currently no-op. --- pkg/host/features.go | 4 ++++ pkg/host/host_test.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/host/features.go b/pkg/host/features.go index 9c02defbd..3bc0127b6 100644 --- a/pkg/host/features.go +++ b/pkg/host/features.go @@ -36,6 +36,10 @@ type Feature struct { type Features [numFeatures]Feature +func (features *Features) Supported() *Features { + return features +} + var checkFeature [numFeatures]func() string func unconditionallyEnabled() string { return "" } diff --git a/pkg/host/host_test.go b/pkg/host/host_test.go index c8190dac5..dc8565920 100644 --- a/pkg/host/host_test.go +++ b/pkg/host/host_test.go @@ -56,7 +56,7 @@ func TestCheck(t *testing.T) { if err != nil { t.Fatal(err) } - for _, feat := range features { + for _, feat := range features.Supported() { t.Logf("%-24v: %v", feat.Name, feat.Reason) } } -- cgit mrf-deployment