envsubst-rs icon indicating copy to clipboard operation
envsubst-rs copied to clipboard

docs: update README and lib.rs for namespaced variables

Open AprilNEA opened this issue 2 months ago • 0 comments

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.

AprilNEA avatar Nov 10 '25 22:11 AprilNEA