diff --git a/caldav/client.go b/caldav/client.go index 1e80052..816d281 100644 --- a/caldav/client.go +++ b/caldav/client.go @@ -15,9 +15,10 @@ import ( "github.com/emersion/go-webdav/internal" ) +// Discover performs a DNS-based CalDAV service discovery as described in +// RFC 6764 section 6. It returns the URL to the CalDAV server. func Discover(host string) (string, error) { - url, err := internal.Discover("caldav", host) - return url, err + return internal.Discover("caldav", host) } // Client provides access to a remote CalDAV server. diff --git a/carddav/client.go b/carddav/client.go index dccd9aa..d6cf939 100644 --- a/carddav/client.go +++ b/carddav/client.go @@ -15,9 +15,10 @@ import ( "github.com/emersion/go-webdav/internal" ) +// Discover performs a DNS-based CardDAV service discovery as described in +// RFC 6764 section 6. It returns the URL to the CardDAV server. func Discover(host string) (string, error) { - url, err := internal.Discover("carddav", host) - return url, err + return internal.Discover("carddav", host) } // Client provides access to a remote CardDAV server. diff --git a/internal/client.go b/internal/client.go index 71375aa..f2002a0 100644 --- a/internal/client.go +++ b/internal/client.go @@ -14,8 +14,8 @@ import ( "unicode" ) -// Discover performs a DNS-based CalDAV/CardDAV service discovery as described in -// RFC 6764 section 6. It returns the URL to the CalDAV/CardDAV server. +// Discover performs a DNS-based CalDAV/CardDAV service discovery as described +// in RFC 6764 section 6. It returns the URL to the CalDAV/CardDAV server. func Discover(service string, host string) (string, error) { if service != "caldav" && service != "carddav" { return "", fmt.Errorf("webdav: service discovery of type %v not supported", service)