envsubst-rs
envsubst-rs copied to clipboard
docs: update README and lib.rs for namespaced variables
Summary
This PR adds support for namespaced variables with dot notation (e.g., ${project.DATABASE_URL}). This feature allows users to organize variables using prefixes or hierarchical naming schemes.
Changes
-
Added comprehensive test coverage for namespaced variables:
-
namespaced_vars: Tests basic namespaced variable substitution -
multiple_namespaced_vars: Tests multiple namespaced variables in a single template -
deeply_namespaced_vars: Tests deeply nested namespaced variables
-
-
Updated documentation:
- Added description of namespaced variable support in README.md
- Added example usage in README.md
- Added documentation and example in lib.rs module documentation
Implementation Details
The existing implementation already supported dots in variable names since the validation function only prohibited $, {, and } characters. This PR formally documents and tests this capability.