internal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package internal contains stateful global variables internal to zerrors. This package owes its existence to the separation of zerror's functionality into two packages (zerrors & zmain), which requires for the two to have some internal common package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Basic added in v0.2.0

func Basic(err error) string

Basic serialises an error using the basic encoder function. It is used to produce `Error() string` for zerrors.

func Detail added in v0.2.0

func Detail(err error) string

Detail serialises an error using the detail encoder function. It is used to produce `zerrors.Detail(error) string`.

func GetFrameCapture

func GetFrameCapture() bool

GetFrameCapture is a getter for frameCapture.

func SetBasic added in v0.2.0

func SetBasic(f func(error) string)

SetBasic modifies how the `Error() string` method serialises zerrors. Note this should not rely on the `Error()` method of zerrors or it may enter an infinite recursion.

func SetDetail added in v0.2.0

func SetDetail(f func(error) string)

SetDetail modifies how the `zerrors.Detail(error) string` method serialises zerrors. Note this should not rely on the `Detail(error)` function of zerrors or it may enter an infinite recursion.

func UnsetFrameCapture

func UnsetFrameCapture()

UnsetFrameCapture is only used in zmain, and in testing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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