Skip to content

Latest commit

 

History

History
30 lines (17 loc) · 1 KB

File metadata and controls

30 lines (17 loc) · 1 KB

secretfiles

import "github.com/greenbone/opensight-golang-libraries/pkg/secretfiles"

Package secretfiles eases the parsing of secret files into a string. This is a common scenario when working with docker secrets, where the path to the secret is usually stored in an environment variable <SECRET>_FILE containing a path to a secret stored in the container filesystem.

Index

func ReadSecret(envVar string, target *string) error

ReadSecret reads the file path from the given environment variable and writes the content of this file into the target. Surrounding whitespaces are truncated.

Generated by gomarkdoc