Documentation ¶
Index ¶
- func AnyValueToString(v slog.Value) string
- func AppendAttrsToGroup(groups []string, actualAttrs []slog.Attr, newAttrs ...slog.Attr) []slog.Attr
- func AppendRecordAttrsToAttrs(attrs []slog.Attr, groups []string, record *slog.Record) []slog.Attr
- func AttrToValue(attr slog.Attr) (string, any)
- func AttrsToMap(attrs ...slog.Attr) map[string]any
- func AttrsToString(attrs ...slog.Attr) map[string]string
- func ContextExtractor(ctx context.Context, fns []func(ctx context.Context) []slog.Attr) []slog.Attr
- func ExtractError(attrs []slog.Attr, errorKeys ...string) ([]slog.Attr, error)
- func ExtractFromContext(keys ...any) func(ctx context.Context) []slog.Attr
- func FindAttrByGroupAndKey(attrs []slog.Attr, groups []string, key string) (slog.Attr, bool)
- func FindAttrByKey(attrs []slog.Attr, key string) (slog.Attr, bool)
- func FindAttribute(attrs []slog.Attr, groups []string, key string) (slog.Attr, bool)
- func FormatError(err error) map[string]any
- func FormatErrorKey(values map[string]any, errorKeys ...string) map[string]any
- func FormatRequest(req *http.Request, ignoreHeaders bool) map[string]any
- func Map[T any, R any](collection []T, iteratee func(item T, index int) R) []R
- func RemoveEmptyAttrs(attrs []slog.Attr) []slog.Attr
- func ReplaceAttrs(fn ReplaceAttrFn, groups []string, attrs ...slog.Attr) []slog.Attr
- func ReplaceError(attrs []slog.Attr, errorKeys ...string) []slog.Attr
- func Source(sourceKey string, r *slog.Record) slog.Attr
- func StringSource(sourceKey string, r *slog.Record) slog.Attr
- func UniqAttrs(attrs []slog.Attr) []slog.Attr
- func ValueToString(v slog.Value) string
- type ReplaceAttrFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyValueToString ¶
func AppendAttrsToGroup ¶
func ContextExtractor ¶
func ExtractFromContext ¶
func FindAttrByGroupAndKey ¶
func FindAttribute ¶
func FormatError ¶
func FormatErrorKey ¶
func Map ¶
Map manipulates a slice and transforms it to a slice of another type. Play: https://go.dev/play/p/OkPcYAhBo0D
func ReplaceAttrs ¶
func ValueToString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.