attr

package
v0.0.0-...-62a058d Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgsToAttr

func ArgsToAttr(args []any) (slog.Attr, []any)

argsToAttr turns a prefix of the nonempty args slice into an Attr and returns the unconsumed portion of the slice. If args[0] is an Attr, it returns it. If args[0] is a string, it treats the first two elements as a key-value pair. Otherwise, it treats args[0] as a value with a missing key. This is copied from golang sdk.

func ArgsToAttrSlice

func ArgsToAttrSlice(args []any) []slog.Attr

Turn a slice of arguments, some of which pairs of primitives, some might be attributes already, into a slice of attributes. This is copied from golang sdk.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳