redact

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package redact is a helper internal package that provides the Unsafe and Safe value wrappers. Its name is 'redact' even though a better name would be 'wrappers' so as to ensure that the type name of generated values contains the 'redact.' prefix.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Safe

func Safe(a interface{}) i.SafeValue

Safe turns any value into an object that is considered as safe by the formatter.

This is provided as an “escape hatch” for cases where the other interfaces and conventions fail. Increased usage of this mechanism should be taken as a signal that a new abstraction is missing. The implementation is also slow.

func Unsafe

func Unsafe(a interface{}) interface{}

Unsafe turns any value that would otherwise be considered safe, into an unsafe value.

Types

type SafeWrapper

type SafeWrapper = safeWrapper

SafeWrapper is the type of wrapper produced by Safe. This is exported only for use by the rfmt package. Client packages should not make assumptions about the concrete return type of Safe().

type UnsafeWrap

type UnsafeWrap = unsafeWrap

UnsafeWrap is the type of wrapper produced by Unsafe. This is exported only for use by the rfmt package. Client packages should not make assumptions about the concrete return type of Unsafe().

Jump to

Keyboard shortcuts

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