Documentation

Overview

    Package attr contains unexported functionality related to XML attributes.

    Index

    Constants

    View Source
    const IDLen = 16

      IDLen is the standard length of stanza identifiers in bytes.

      Variables

      This section is empty.

      Functions

      func Get

      func Get(attr []xml.Attr, local string) (int, string)

        Get returns the value and index of the first attribute with the provided local name from a list of attributes or -1 and an empty string if no such attribute exists.

        func RandomID

        func RandomID() string

          RandomID generates a new random identifier of length IDLen. If the OS's entropy pool isn't initialized, or we can't generate random numbers for some other reason, panic.

          func RandomLen

          func RandomLen(n int) string

            RandomLen is like RandomID but the length is configurable.

            Types

            This section is empty.