attr

package
v0.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2022 License: BSD-2-Clause Imports: 4 Imported by: 0

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 added in v0.19.0

func RandomLen(n int) string

RandomLen is like RandomID but the length is configurable.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL