tag

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package tag provides typed key/value pairs used to attach structured context to log entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tag

type Tag struct {
	Key   string
	Value any
}

Tag is a single structured key/value pair attached to a log entry.

func Component

func Component(c string) Tag

Component returns a tag with key "component" and the supplied value.

func Error

func Error(err error) Tag

Error returns a Tag with key "error" carrying err's message.

func String

func String(k, v string) Tag

String returns a Tag for the given key and string value.

func Stringer

func Stringer(k string, v fmt.Stringer) Tag

Stringer returns a Tag whose value is v.String(), evaluated immediately.

Jump to

Keyboard shortcuts

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