8
8
"encoding/json"
9
9
"fmt"
10
10
"io"
11
- "io/ioutil"
12
11
"net/http"
13
12
"strconv"
14
13
"strings"
@@ -267,7 +266,7 @@ func (a *scenarioTestAction) Execute(ctx node.Context) error {
267
266
}
268
267
269
268
if resp .StatusCode != http .StatusOK {
270
- buf , _ := ioutil .ReadAll (resp .Body )
269
+ buf , _ := io .ReadAll (resp .Body )
271
270
return xerrors .Errorf ("unexpected status: %s - %s" , resp .Status , buf )
272
271
}
273
272
@@ -525,7 +524,7 @@ func (a *scenarioTestAction) Execute(ctx node.Context) error {
525
524
}
526
525
527
526
if resp .StatusCode != http .StatusOK {
528
- buf , _ := ioutil .ReadAll (resp .Body )
527
+ buf , _ := io .ReadAll (resp .Body )
529
528
return xerrors .Errorf ("unexpected shuffle status: %s - %s" , resp .Status , buf )
530
529
}
531
530
@@ -686,7 +685,7 @@ func castVote(electionID string, signed []byte, proxyAddr string) (string, error
686
685
}
687
686
688
687
if resp .StatusCode != http .StatusOK {
689
- buf , _ := ioutil .ReadAll (resp .Body )
688
+ buf , _ := io .ReadAll (resp .Body )
690
689
return "" , xerrors .Errorf ("unexpected status: %s - %s" , resp .Status , buf )
691
690
}
692
691
@@ -721,7 +720,7 @@ func updateElection(secret kyber.Scalar, proxyAddr, electionIDHex, action string
721
720
}
722
721
723
722
if resp .StatusCode != http .StatusOK {
724
- buf , _ := ioutil .ReadAll (resp .Body )
723
+ buf , _ := io .ReadAll (resp .Body )
725
724
return resp .StatusCode , xerrors .Errorf ("unexpected status: %s - %s" , resp .Status , buf )
726
725
}
727
726
@@ -744,7 +743,7 @@ func initDKG(secret kyber.Scalar, proxyAddr, electionIDHex string) error {
744
743
}
745
744
746
745
if resp .StatusCode != http .StatusOK {
747
- buf , _ := ioutil .ReadAll (resp .Body )
746
+ buf , _ := io .ReadAll (resp .Body )
748
747
return xerrors .Errorf ("unexpected status: %s - %s" , resp .Status , buf )
749
748
}
750
749
@@ -772,7 +771,7 @@ func updateDKG(secret kyber.Scalar, proxyAddr, electionIDHex, action string) (in
772
771
}
773
772
774
773
if resp .StatusCode != http .StatusOK {
775
- buf , _ := ioutil .ReadAll (resp .Body )
774
+ buf , _ := io .ReadAll (resp .Body )
776
775
return resp .StatusCode , xerrors .Errorf ("unexpected status: %s - %s" , resp .Status , buf )
777
776
}
778
777
0 commit comments