util

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAllTags

func ExtractAllTags(xmlStr, tagName string) []string

func ExtractAttr

func ExtractAttr(xml, attr string) string

ExtractAttr finds the first occurrence.

func ExtractAttrInTag

func ExtractAttrInTag(xml, tagName, attr string) string

ExtractAttrInTag finds attr only in a specific tag.

func ExtractMultipleTags

func ExtractMultipleTags(xml, tag string) []string

ExtractMultipleTags returns all matches for <tagName>...</tagName> or self-closing <tagName ... />.

func ExtractTagValue

func ExtractTagValue(xml, tag string) string

ExtractTagValue extracts the text inside a given XML tag. Example: <jid>foo@bar</jid> => "foo@bar"

func MustAtoi

func MustAtoi(s string) int

MustAtoi converts string to int, panics if conversion fails.

func MustAtoi64

func MustAtoi64(s string) int64

MustAtoi64 converts string to int64, panics if conversion fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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