errwrapper

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package errwrapper contains our error wrapper

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scrub added in v0.11.0

func Scrub(s string) string

Scrub sanitizes a string containing an error such that any occurrence of IP endpoints is scrubbed

Types

type SafeErrWrapperBuilder

type SafeErrWrapperBuilder struct {
	// ConnID is the connection ID, if any
	ConnID int64

	// DialID is the dial ID, if any
	DialID int64

	// Error is the error, if any
	Error error

	// Operation is the operation that failed
	Operation string

	// TransactionID is the transaction ID, if any
	TransactionID int64
}

SafeErrWrapperBuilder contains a builder for modelx.ErrWrapper that is safe, i.e., behaves correctly when the error is nil.

func (SafeErrWrapperBuilder) MaybeBuild

func (b SafeErrWrapperBuilder) MaybeBuild() (err error)

MaybeBuild builds a new modelx.ErrWrapper, if b.Error is not nil, and returns a nil error value, instead, if b.Error is nil.

Jump to

Keyboard shortcuts

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