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:
Mark Haines 2017-07-07 14:11:32 +01:00 committed by GitHub
parent b13cbb18fb
commit 69c29172c3
21 changed files with 118 additions and 129 deletions

View file

@ -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),
}}