util

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeforeAll

func BeforeAll(fns ...cli.BeforeFunc) cli.BeforeFunc

BeforeAll runs multiple BeforeFuncs in order

func LoggingMiddleware added in v0.3.0

func LoggingMiddleware(next http.Handler) http.Handler

LoggingMiddleware is an HTTP middleware that logs information about the incoming request.

func ServeWithContext

func ServeWithContext(ctx context.Context, srv *http.Server, lis net.Listener) error

ServeWithContext starts an HTTP server and listens for incoming requests. It will shut down the server when the provided context is canceled.

Types

type LevelFlag

type LevelFlag slog.Level

LevelFlag is a urfave/cli compatible flag for setting the log verbosity level.

func FromSlogLevel

func FromSlogLevel(l slog.Level) *LevelFlag

func (*LevelFlag) Set

func (f *LevelFlag) Set(value string) error

func (*LevelFlag) String

func (f *LevelFlag) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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