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.
func ReadSecret
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