utils

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSafeError added in v0.12.0

func NewSafeError(err error, msg string) error

NewSafeError returns a new SafeError.

func NewSafeErrorf added in v0.12.0

func NewSafeErrorf(err error, format string, args ...interface{}) error

NewSafeErrorf returns a new SafeError with formatting.

Types

type SafeError added in v0.12.0

type SafeError struct {
	Err error
	Msg string
}

SafeError wraps an error which may contain sensitive information, allowing it to be matched without exposing sensitive details when logging the error.

func (*SafeError) Error added in v0.12.0

func (s *SafeError) Error() string

Error returns the safe error message.

func (*SafeError) UnsafeError added in v0.12.0

func (s *SafeError) UnsafeError() string

UnsafeError returns the full error message, which may contain sensitive information.

func (*SafeError) Unwrap added in v0.12.0

func (s *SafeError) Unwrap() error

Unwrap returns the wrapped error, which may contain sensitive information.

Jump to

Keyboard shortcuts

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