diff options
author | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2019-07-31 11:48:19 -0700 |
---|---|---|
committer | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2019-07-31 11:48:23 -0700 |
commit | c9c8b012a027e7ff234ac3440620303374464665 (patch) | |
tree | ededa18e2bede9c740bd1982447127a9bde770d6 /src/k8splugin/plugins/generic | |
parent | 09dffa6d151b046a87edcb91a46449cabc66532c (diff) |
Add static compile time check to plugins
Add a static compile time check to
plugins to make sure that any interface implementation
mismatch is caught at compile time rather than runtime.
Issue-ID: MULTICLOUD-666
Change-Id: I7f57774ad9384edb874cf64534f521014aea422f
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src/k8splugin/plugins/generic')
-rw-r--r-- | src/k8splugin/plugins/generic/plugin.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/k8splugin/plugins/generic/plugin.go b/src/k8splugin/plugins/generic/plugin.go index b9a96ab5..b20cbe37 100644 --- a/src/k8splugin/plugins/generic/plugin.go +++ b/src/k8splugin/plugins/generic/plugin.go @@ -23,10 +23,13 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utils "github.com/onap/multicloud-k8s/src/k8splugin/internal" - "github.com/onap/multicloud-k8s/src/k8splugin/internal/plugin" "github.com/onap/multicloud-k8s/src/k8splugin/internal/helm" + "github.com/onap/multicloud-k8s/src/k8splugin/internal/plugin" ) +// Compile time check to see if genericPlugin implements the correct interface +var _ plugin.Reference = genericPlugin{} + // ExportedVariable is what we will look for when calling the generic plugin var ExportedVariable genericPlugin |