mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
use url.URL in place of string for most internal listen/peer address handling
This commit is contained in:
parent
58af92812e
commit
70c5b06286
4 changed files with 61 additions and 46 deletions
|
@ -73,11 +73,11 @@ func (l *links) reconfigure() {
|
|||
l.tcp.reconfigure()
|
||||
}
|
||||
|
||||
func (l *links) call(uri string, sintf string) error {
|
||||
u, err := url.Parse(uri)
|
||||
if err != nil {
|
||||
return fmt.Errorf("peer %s is not correctly formatted (%s)", uri, err)
|
||||
}
|
||||
func (l *links) call(u *url.URL, sintf string) error {
|
||||
//u, err := url.Parse(uri)
|
||||
//if err != nil {
|
||||
// return fmt.Errorf("peer %s is not correctly formatted (%s)", uri, err)
|
||||
//}
|
||||
pathtokens := strings.Split(strings.Trim(u.Path, "/"), "/")
|
||||
tcpOpts := tcpOptions{}
|
||||
if pubkeys, ok := u.Query()["ed25519"]; ok && len(pubkeys) > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue