tag

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: GPL-2.0, MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Key = iota
	Value
	Relay
)

The tag position meanings so they are clear when reading.

View Source
const (
	MarkerReply   = "reply"
	MarkerRoot    = "root"
	MarkerMention = "mention"
)

T marker strings for e (reference) tags.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T []string

T is a list of strings with a literal ordering.

Not a set, there can be repeating elements.

func (T) Clone

func (t T) Clone() (c T)

Clone makes a new tag.T with the same members.

func (T) Contains

func (t T) Contains(s string) bool

Contains returns true if the provided element is found in the tag slice.

func (T) Equals

func (t T) Equals(t1 T) bool

Equals checks that the provided tag list matches.

func (T) Key

func (t T) Key() string

Key returns the first element of the tags.

func (T) MarshalTo

func (t T) MarshalTo(dst []byte) []byte

MarshalTo T. Used for Serialization so string escaping should be as in RFC8259.

func (T) Relay

func (t T) Relay() string

Relay returns the third element of the tag.

func (T) StartsWith

func (t T) StartsWith(prefix []string) bool

StartsWith checks a tag has the same initial set of elements.

The last element is treated specially in that it is considered to match if the candidate has the same initial substring as its corresponding element.

func (T) String

func (t T) String() string

func (T) Value

func (t T) Value() string

Value returns the second element of the tag.

Jump to

Keyboard shortcuts

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