internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithUtil

func ContextWithUtil(ctx context.Context, util Util) context.Context

ContextWithUtil wraps ctx and returns a context that contains Util.

Types

type DefaultUtil

type DefaultUtil struct{}

DefaultUtil is the default implementation of Util. This is used when no Util is set (i.e. in tests).

func (DefaultUtil) Logger

func (DefaultUtil) Logger(ctx context.Context) *zerolog.Logger

type Util

type Util interface {
	Logger(ctx context.Context) *zerolog.Logger
}

func UtilFromContext

func UtilFromContext(ctx context.Context) Util

UtilFromContext fetches the record Util from the context. If the context does not contain a Util it returns nil.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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