Clarify search and secret bootstrap names

This commit is contained in:
2026-10-27 15:09:04 +00:00
parent 9ac0053590
commit eafbd32489
7 changed files with 25 additions and 24 deletions

View File

@@ -8,7 +8,7 @@ import (
)
// SecretFileStatus describes the outcome for one file considered by
// LoadSecretsDir.
// LoadSecretsIntoEnvironment.
type SecretFileStatus string
const (
@@ -85,11 +85,12 @@ func (e *SecretsError) Diagnostics() []Diagnostic {
return result
}
// LoadSecretsDir explicitly loads immediate regular files from directory into
// previously unset process environment variables. Applications should call it
// once during startup, before concurrent work; Load never calls it.
// Dot-prefixed entries are ignored and omitted from the report.
func LoadSecretsDir(directory string) (*SecretsReport, error) {
// LoadSecretsIntoEnvironment explicitly loads immediate regular files into the
// process environment, preserving variables that are already set, including
// empty values. Dot-prefixed entries are ignored and omitted from the report.
// Load never calls it. The report accompanies any error, and an error does not
// roll back values already applied.
func LoadSecretsIntoEnvironment(directory string) (*SecretsReport, error) {
report, err := engine.LoadSecretsDir(directory)
result := &SecretsReport{value: report}
if err == nil {