secretreader

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package secretreader provides functionality for securely reading secret values from files. It handles file reading, whitespace trimming, and validation to ensure that secrets are properly loaded. The package implements error handling for common issues such as missing files or empty content.

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptySecret = errors.New("secret is empty after trimming whitespace")

ErrEmptySecret is returned when a secret file is empty or contains only whitespace

Functions

func ReadSecret

func ReadSecret(path string) ([]byte, error)

ReadSecret reads and trims a secret from a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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