mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-01 15:47:38 +02:00
get rid of arrays in the kuberesources;
use shorter form of checking for errors
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user