utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSafeError

func NewSafeError(err error, msg string) error

NewSafeError returns a new SafeError.

func NewSafeErrorf

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

NewSafeErrorf returns a new SafeError with formatting.

Types

type Bitmap

type Bitmap struct {
	// contains filtered or unexported fields
}

func NewBitmap

func NewBitmap(l int) *Bitmap

func NewBitmapFromData

func NewBitmapFromData(data []byte) *Bitmap

func (*Bitmap) Bytes

func (b *Bitmap) Bytes() []byte

func (*Bitmap) IsSet

func (b *Bitmap) IsSet(i int) bool

func (*Bitmap) Len

func (b *Bitmap) Len() int

Return number of bits in the bitmap

func (*Bitmap) Set

func (b *Bitmap) Set(i int)

func (*Bitmap) String

func (b *Bitmap) String() string

type SafeError

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

func (s *SafeError) Error() string

Error returns the safe error message.

func (*SafeError) UnsafeError

func (s *SafeError) UnsafeError() string

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

func (*SafeError) Unwrap

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