p2p/simulations: fix lint

This commit is contained in:
Felix Lange 2017-12-11 23:03:00 +01:00
parent 7690565732
commit 645346739f
2 changed files with 18 additions and 18 deletions

View file

@ -44,7 +44,7 @@ func LookupMocker(mockerType string) func(net *Network, quit chan struct{}, node
//Useful for frontend to build available mocker selection
func GetMockerList() []string {
list := make([]string, 0, len(mockerList))
for k, _ := range mockerList {
for k := range mockerList {
list = append(list, k)
}
return list

View file

@ -53,10 +53,10 @@ func TestMocker(t *testing.T) {
//get the list of available mocker types
resp, err := http.Get(s.URL + "/mocker")
defer resp.Body.Close()
if err != nil {
t.Fatalf("Could not get mocker list: %s", err)
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
t.Fatalf("Invalid Status Code received, expected 200, got %d", resp.StatusCode)