Skip to content

Commit

Permalink
Merge pull request #272 from seans3/cast-provider-interface
Browse files Browse the repository at this point in the history
Verifies interfaces Provider and ManifestReader are satisfied
  • Loading branch information
seans3 committed Nov 7, 2020
2 parents d616cce + 75f251e commit fcb33da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/manifestreader/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import (
"sigs.k8s.io/kustomize/kyaml/kio/kioutil"
)

// PathManifestReader implements ManifestReader interface.
var _ ManifestReader = &PathManifestReader{}

// PathManifestReader reads manifests from the provided path
// and returns them as Info objects. The returned Infos will not have
// client or mapping set.
Expand Down
3 changes: 3 additions & 0 deletions pkg/manifestreader/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import (
"sigs.k8s.io/kustomize/kyaml/kio/kioutil"
)

// StreamManifestReader implements ManifestReader interface.
var _ ManifestReader = &StreamManifestReader{}

// StreamManifestReader reads manifest from the provided io.Reader
// and returns them as Info objects. The returned Infos will not have
// client or mapping set.
Expand Down
3 changes: 3 additions & 0 deletions pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import (
"sigs.k8s.io/cli-utils/pkg/manifestreader"
)

// InventoryProvider implements the Provider interface.
var _ Provider = &InventoryProvider{}

// Provider is an interface which wraps the kubectl factory and
// the inventory client.
type Provider interface {
Expand Down

0 comments on commit fcb33da

Please sign in to comment.