secret

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package secret holds values that must never be printed, like the passwords in secrets.env.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

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

Value is a secret. printing it with fmt, %v, %#v or slog prints ***; Reveal returns the value, and is called only where it is written into a file on a node.

func New

func New(v string) Value

New wraps v.

func (Value) Format

func (s Value) Format(f fmt.State, _ rune)

Format handles every verb, so %q, %x and %d print *** too.

func (Value) GoString

func (s Value) GoString() string

GoString is used by %#v.

func (Value) LogValue

func (s Value) LogValue() slog.Value

LogValue is used by lgo/slog.

func (Value) Reveal

func (s Value) Reveal() string

Reveal returns the secret itself.

func (Value) String

func (s Value) String() string

String is used by %s, %v, Print and Println.

Jump to

Keyboard shortcuts

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