go-utils

module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT

README

go-utils

Test status

Various reusable Go utilities and modules

cli

Various minor command-line interface helpers: cli.go

httplogger

Logging middleware for HTTP requests using go-ethereum/log. See examples/httplogger/main.go

Install:

go get github.com/flashbots/go-utils/httplogger

Use:

mux := http.NewServeMux()
mux.HandleFunc("/v1/hello", HelloHandler)
loggedRouter := httplogger.LoggingMiddleware(r)

Directories

Path Synopsis
Package cli implements various reusable utility functions for command-line interfaces.
Package cli implements various reusable utility functions for command-line interfaces.
examples
httplogger command
Package httplogger implements a middleware that logs the incoming HTTP request & its duration using go-ethereum-log.
Package httplogger implements a middleware that logs the incoming HTTP request & its duration using go-ethereum-log.

Jump to

Keyboard shortcuts

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