memory

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package memory implements an in-memory handler useful for testing, as the entries can be accessed after writes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Entries []log.Entry
	// contains filtered or unexported fields
}

Handler implementation.

func New

func New() *Handler

New handler.

func (*Handler) Flush added in v1.0.1

func (h *Handler) Flush() error

Flush clear all buffer

func (*Handler) Log

func (h *Handler) Log(e log.Entry) error

Log implements log.Handler.

Jump to

Keyboard shortcuts

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