message

package
v3.41.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasTag

func HasTag(t *Tag, p types.Part) bool

HasTag checks whether a message part has a particular tag associated with it.

func WithTag

func WithTag(t *Tag, p types.Part) types.Part

WithTag returns a message with a tag attached to it via context. A message can have any number of tags.

Types

type Tag

type Tag struct {
	Index int
}

Tag is a struct that can be appended to a message via context in order to identify it (and derivatives) after processing.

func NewTag

func NewTag(index int) *Tag

NewTag creates a new tag to be associated with a message.

Jump to

Keyboard shortcuts

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