Use utility methods from gomatrixserverlib. (#152)
* Use utility methods from gomatrixserverlib, rather than reimplementing them * Return string rather than pointer to string * Update gomatrixserverlib
This commit is contained in:
parent
b13cbb18fb
commit
69c29172c3
21 changed files with 118 additions and 129 deletions
|
|
@ -57,7 +57,7 @@ func LookupServer(serverName ServerName) (*DNSResult, error) {
|
|||
return nil, err
|
||||
}
|
||||
// If there isn't a SRV record in DNS then fallback to "serverName:8448".
|
||||
hosts[string(serverName)] = []net.SRV{net.SRV{
|
||||
hosts[string(serverName)] = []net.SRV{{
|
||||
Target: string(serverName),
|
||||
Port: 8448,
|
||||
}}
|
||||
|
|
@ -80,7 +80,7 @@ func LookupServer(serverName ServerName) (*DNSResult, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
hosts[host] = []net.SRV{net.SRV{
|
||||
hosts[host] = []net.SRV{{
|
||||
Target: host,
|
||||
Port: uint16(port),
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue