diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-11-15 11:42:18 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-11-16 09:58:54 +0100 |
| commit | 587cec15e23ecafc9b00f8ae775a98d0e4803997 (patch) | |
| tree | c4911f94c12a1cce7c02ab3769fce8ae6b497bb9 /pkg | |
| parent | a129861adb55f3c438eaee27302e76c099aa363d (diff) | |
pkg/host: add Features.Supported
To reduce diff in future changes. Currently no-op.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/host/features.go | 4 | ||||
| -rw-r--r-- | pkg/host/host_test.go | 2 |
2 files changed, 5 insertions, 1 deletions
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) } } |
