helper

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerFactory

func HandlerFactory(code int, message string) http.HandlerFunc

HandlerFactory is a helper function useful for unit tests

func ParseAllJSONLog

func ParseAllJSONLog(buf *bytes.Buffer) (data []map[string]interface{}, err error)

ParseAllJSONLog accepts buffer and finds and parses ALL json blobs. This is useful when mocking log.* function.

func ParseJSONLog

func ParseJSONLog(buf *bytes.Buffer) (data map[string]interface{}, err error)

ParseJSONLog accepts buffer and finds and parses a json blob. This is useful when mocking log.* function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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