get rid of arrays in the kuberesources;

use shorter form of checking for errors
This commit is contained in:
Murat Kabilov
2017-05-12 11:41:26 +02:00
parent abd313f2d9
commit 416dace289
6 changed files with 167 additions and 170 deletions
+2 -4
View File
@@ -52,8 +52,7 @@ func (c *Controller) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) {
wg.Add(1)
c.initController()
err := c.initEtcdClient()
if err != nil {
if err := c.initEtcdClient(); err != nil {
c.logger.Errorf("Can't get etcd client: %s", err)
return
}
@@ -65,8 +64,7 @@ func (c *Controller) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) {
}
func (c *Controller) initController() {
err := c.createTPR()
if err != nil {
if err := c.createTPR(); err != nil {
c.logger.Fatalf("Can't register ThirdPartyResource: %s", err)
}