Skip to content

Commit

Permalink
Merge pull request #21 from uds5501/dev-uddeshya
Browse files Browse the repository at this point in the history
Add error handling in cache package
  • Loading branch information
leecalcote authored Jan 3, 2021
2 parents dfe8bce + c787318 commit 6185522
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,21 @@ var (

func init() {
// Initialize Kubeconfig
rconfig, _ := mesherykube.DetectKubeConfig()
rconfig, err1 := mesherykube.DetectKubeConfig()
if err1 != nil {
return
}

// Configure discovery client
dclient, _ := discovery.NewClient(rconfig)
dclient, err2 := discovery.NewClient(rconfig)
if err2 != nil {
return
}

namespaces, _ := dclient.ListNamespaces()
namespaces, err3 := dclient.ListNamespaces()
if err3 != nil {
return
}
var namespacesName []string

// processing
Expand Down

0 comments on commit 6185522

Please sign in to comment.