@@ -194,7 +194,7 @@ func (opt *options) createRestorePods(memberPod corev1.Pod, args []string) (*cor
194194
195195 for _ , vol := range memberPod .Spec .Volumes {
196196 if vol .Name == dataVolume {
197- pvcName = vol .VolumeSource . PersistentVolumeClaim .ClaimName
197+ pvcName = vol .PersistentVolumeClaim .ClaimName
198198 break
199199 }
200200 }
@@ -285,7 +285,7 @@ func (opt *options) replaceOldDataWithRestoredData(restorePods []corev1.Pod) err
285285 command := []string {StashEtcd , "replace" }
286286 command = append (command , "--data-dir=" + opt .etcd .dataDir )
287287
288- execOut , err := opt .execCommandOnPod (& pod , pod .ObjectMeta . Name , command )
288+ execOut , err := opt .execCommandOnPod (& pod , pod .Name , command )
289289 if err != nil {
290290 return err
291291 }
@@ -388,7 +388,7 @@ func (opt *options) getEtcdMemberPods() ([]corev1.Pod, error) {
388388 }
389389 return []corev1.Pod {* pod }, nil
390390 default :
391- return nil , errors .New ("Could not find any member for etcd server" )
391+ return nil , errors .New ("could not find any member for etcd server" )
392392 }
393393}
394394
@@ -422,7 +422,7 @@ func (opt *options) execCommandOnPod(pod *corev1.Pod, containerName string, comm
422422 Tty : true ,
423423 })
424424 if err != nil {
425- return nil , fmt .Errorf ("Could not execute: %v, reason: %s" , err , execErr .String ())
425+ return nil , fmt .Errorf ("could not execute: %v, reason: %s" , err , execErr .String ())
426426 }
427427
428428 return execOut .Bytes (), nil
@@ -545,7 +545,7 @@ func (opt *options) getCredential(appBinding *appcatalog.AppBinding) ([]string,
545545 tlsArgs = fmt .Sprintf ("--key=%v" , filepath .Join (opt .setupOptions .ScratchDir , EtcdClientKeyFile ))
546546 args = append (args , tlsArgs )
547547 } else {
548- return nil , errors .New ("Client cert and client key needed for TLS secured operation" )
548+ return nil , errors .New ("client cert and client key needed for TLS secured operation" )
549549 }
550550
551551 return args , nil
0 commit comments