capture

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

README

go-capture

Utility functions to capture standard output, error output, or log output

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StandardOutput

func StandardOutput(function func()) (string, error)

StandardOutput captures the standard output for specified code block and then returns the captured output. Please see https://medium.com/@hau12a1/golang-capturing-log-println-and-fmt-println-output-770209c791b4 for further explanation how it works under the hood.

Types

This section is empty.

Jump to

Keyboard shortcuts

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