~samwhited/xmpp

2b40711b8b4b9cfa3ebe593871f7834c4aa25451 — Sam Whited 4 years ago ef6a09b
internal: add doc comments to a few functions

[ci skip]
2 files changed, 6 insertions(+), 0 deletions(-)

M internal/lookup.go
M internal/xmlutil.go
M internal/lookup.go => internal/lookup.go +4 -0
@@ 63,6 63,10 @@ var (
	}
)

// LookupPort returns the default port for the provided network and service
// using net.LookupPort.
// If the provided service is one of xmpp-client, xmpp-server, or xmpp-bosh and
// it is not found by net.LookupPort, a default value is returned.
func LookupPort(network, service string) (int, error) {
	p, err := net.LookupPort(network, service)
	if err == nil {

M internal/xmlutil.go => internal/xmlutil.go +2 -0
@@ 8,6 8,8 @@ import (
	"encoding/xml"
)

// GetAttr returns the value of the first attribute with the provided local name
// from a list of attributes or an empty string if no such attribute exists.
func GetAttr(attr []xml.Attr, local string) string {
	for _, a := range attr {
		if a.Name.Local == local {