@@ -55,12 +55,6 @@ type BootstrapVshardResponse struct {
5555
5656// FailoverData Structure of data for changing failover status
5757type FailoverData struct {
58- failover * FailoverParams `json:"failover_params"`
59- }
60-
61- // FailoverParams returns the mode of failover which has been enabled
62- type FailoverParams struct {
63- mode string `json:"mode"`
6458}
6559
6660// FailoverResponse type struct for returning on failovers
@@ -256,7 +250,7 @@ func (s *BuiltInTopologyService) Join(pod *corev1.Pod) error {
256250 return err
257251 }
258252
259- if resp .JoinInstance == true {
253+ if resp .JoinInstance {
260254 return nil
261255 }
262256
@@ -294,7 +288,7 @@ func (s *BuiltInTopologyService) Expel(pod *corev1.Pod) error {
294288 return err
295289 }
296290
297- if resp .Data .ExpelInstance == false && (resp .Errors == nil || len (resp .Errors ) == 0 ) {
291+ if ! resp .Data .ExpelInstance && (resp .Errors == nil || len (resp .Errors ) == 0 ) {
298292 return errors .New ("something really bad happened" )
299293 }
300294
@@ -323,7 +317,7 @@ func (s *BuiltInTopologyService) SetWeight(replicasetUUID string, replicaWeight
323317 return err
324318 }
325319
326- if resp .Response == true {
320+ if resp .Response {
327321 return nil
328322 }
329323
@@ -353,7 +347,7 @@ func (s *BuiltInTopologyService) BootstrapVshard() error {
353347
354348 reqLogger .Info ("Bootstrapping vshard" )
355349
356- req := fmt . Sprint ( "mutation bootstrap {bootstrapVshardResponse: bootstrap_vshard}" )
350+ req := "mutation bootstrap {bootstrapVshardResponse: bootstrap_vshard}"
357351 j := fmt .Sprintf ("{\" query\" : \" %s\" }" , req )
358352 rawResp , err := http .Post (s .serviceHost , "application/json" , strings .NewReader (j ))
359353 if err != nil {
0 commit comments