diff --git a/internal/cmd/internal/olmv1/catalog/alpha_inspect.go b/internal/cmd/internal/olmv1/catalog/alpha_inspect.go index f3f15ff..4bef4af 100644 --- a/internal/cmd/internal/olmv1/catalog/alpha_inspect.go +++ b/internal/cmd/internal/olmv1/catalog/alpha_inspect.go @@ -15,7 +15,7 @@ import ( ) func NewInspectCommand(cfg *action.Configuration) *cobra.Command { - i, err := experimentalaction.NewCatalogInspect(cfg, + i := experimentalaction.NewCatalogInspect(cfg, func(c *action.Configuration) experimentalaction.CatalogFetcher { return fetcher.New(c.Client) }, @@ -23,9 +23,6 @@ func NewInspectCommand(cfg *action.Configuration) *cobra.Command { return streamer.New(c.Clientset.CoreV1()) }, ) - if err != nil { - log.Fatal(err) - } i.Logf = log.Printf cmd := &cobra.Command{ diff --git a/internal/cmd/internal/olmv1/catalog/alpha_list.go b/internal/cmd/internal/olmv1/catalog/alpha_list.go index 364043e..7b84b23 100644 --- a/internal/cmd/internal/olmv1/catalog/alpha_list.go +++ b/internal/cmd/internal/olmv1/catalog/alpha_list.go @@ -14,7 +14,7 @@ import ( ) func NewListCommand(cfg *action.Configuration) *cobra.Command { - i, err := experimentalaction.NewCatalogList(cfg, + i := experimentalaction.NewCatalogList(cfg, func(c *action.Configuration) experimentalaction.CatalogFetcher { return fetcher.New(c.Client) }, @@ -22,9 +22,6 @@ func NewListCommand(cfg *action.Configuration) *cobra.Command { return streamer.New(c.Clientset.CoreV1()) }, ) - if err != nil { - log.Fatal(err) - } i.Logf = log.Printf cmd := &cobra.Command{ diff --git a/internal/cmd/internal/olmv1/catalog/alpha_search.go b/internal/cmd/internal/olmv1/catalog/alpha_search.go index b8f6131..edf9ae6 100644 --- a/internal/cmd/internal/olmv1/catalog/alpha_search.go +++ b/internal/cmd/internal/olmv1/catalog/alpha_search.go @@ -14,7 +14,7 @@ import ( ) func NewSearchCommand(cfg *action.Configuration) *cobra.Command { - i, err := experimentalaction.NewCatalogSearch(cfg, + i := experimentalaction.NewCatalogSearch(cfg, func(c *action.Configuration) experimentalaction.CatalogFetcher { return fetcher.New(c.Client) }, @@ -22,9 +22,7 @@ func NewSearchCommand(cfg *action.Configuration) *cobra.Command { return streamer.New(c.Clientset.CoreV1()) }, ) - if err != nil { - log.Fatal(err) - } + i.Logf = log.Printf cmd := &cobra.Command{ diff --git a/internal/pkg/experimental/action/catalog_inspect.go b/internal/pkg/experimental/action/catalog_inspect.go index d01b367..9d1105a 100644 --- a/internal/pkg/experimental/action/catalog_inspect.go +++ b/internal/pkg/experimental/action/catalog_inspect.go @@ -89,13 +89,13 @@ func CatalogInspectOptionsFromFlags(flagSet *pflag.FlagSet) (*CatalogInspectOpti }, nil } -func NewCatalogInspect(cfg *action.Configuration, fetcherFunc FetcherFunc, streamerFunc StreamerFunc) (*CatalogInspect, error) { +func NewCatalogInspect(cfg *action.Configuration, fetcherFunc FetcherFunc, streamerFunc StreamerFunc) *CatalogInspect { return &CatalogInspect{ config: cfg, createFetcherFunc: fetcherFunc, createStreamerFunc: streamerFunc, Logf: func(string, ...interface{}) {}, - }, nil + } } // Run will return a list of catalog objects using the Meta type that match the provided options. diff --git a/internal/pkg/experimental/action/catalog_list.go b/internal/pkg/experimental/action/catalog_list.go index c2e7a2a..c59c518 100644 --- a/internal/pkg/experimental/action/catalog_list.go +++ b/internal/pkg/experimental/action/catalog_list.go @@ -91,13 +91,13 @@ func CatalogListOptionsFromFlags(flagSet *pflag.FlagSet) (*CatalogListOptions, e }, nil } -func NewCatalogList(cfg *action.Configuration, fetcherFunc FetcherFunc, streamerFunc StreamerFunc) (*CatalogList, error) { +func NewCatalogList(cfg *action.Configuration, fetcherFunc FetcherFunc, streamerFunc StreamerFunc) *CatalogList { return &CatalogList{ config: cfg, createFetcherFunc: fetcherFunc, createStreamerFunc: streamerFunc, Logf: func(string, ...interface{}) {}, - }, nil + } } // Run will return a list of catalog objects using the Meta type that match the provided options. diff --git a/internal/pkg/experimental/action/catalog_search.go b/internal/pkg/experimental/action/catalog_search.go index d03ad96..eec6526 100644 --- a/internal/pkg/experimental/action/catalog_search.go +++ b/internal/pkg/experimental/action/catalog_search.go @@ -81,13 +81,13 @@ func CatalogSearchOptionsFromFlags(flagSet *pflag.FlagSet) (*CatalogSearchOption }, nil } -func NewCatalogSearch(cfg *action.Configuration, fetcherFunc FetcherFunc, streamerFunc StreamerFunc) (*CatalogSearch, error) { +func NewCatalogSearch(cfg *action.Configuration, fetcherFunc FetcherFunc, streamerFunc StreamerFunc) *CatalogSearch { return &CatalogSearch{ config: cfg, createFetcherFunc: fetcherFunc, createStreamerFunc: streamerFunc, Logf: func(string, ...interface{}) {}, - }, nil + } } // Run will return a list of catalog objects using the Meta type that match the provided options.