Discover Packages
github.com/idelchi/envprof
internal
envprof
package
Version:
v0.0.9
Opens a new window with list of versions in this module.
Published: Aug 19, 2025
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package envprof loads and unmarshals environment profile configurations from various file formats.
It supports YAML, TOML and JSON formats for defining environment profiles.
Template renders a Go text/template using the provided env map.
Template usage: {{ .FOO }} or {{ .FOO | default "fallback" }}.
Unmarshal decodes the data into profiles.
EnvProf represents an environment profile file and its loaded content.
New creates a new EnvProf instance from the given file.
NewFrom creates a new EnvProf instance from the first found among the given files.
File returns the resolved file.
GetOrDefault returns the profile name if it exists, or the default profile if none is specified.
Load reads the file and unmarshals it into the store.
Profiles returns the loaded profiles.
TryParse attempts to parse the given data into the supported profile formats.
Type determines and sets the file format based on the file extension.
Type represents the type of the profile file.
const (
YAML Type = "yaml"
TOML Type = "toml"
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.