You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

16 lines
289 B

package main
import (
"encoding/json"
"io/ioutil"
"net/http"
)
func getPeers() {
res, err := http.Get("http://" + config.IP + ":" + config.ServerRESTPort + "/peers")
check(err)
body, err := ioutil.ReadAll(res.Body)
check(err)
err = json.Unmarshal(body, &peersList)
check(err)
}