env_applier
env_applier is a Rust crate that applies environment variables to placeholders in a string, making configuration handling simple and flexible.
Getting Started
Installation
Add the following line to your Cargo.toml:
[]
= "x.y.z" # Replace with the latest version
Quick Start
Basic Example
extern crate env_applier;
use *;
In this example, {{ HOME }} is replaced with the value of the HOME environment variable.
Example with Prefix
extern crate env_applier;
use *;
When using apply_with_prefix, only environment variables prefixed with MY_PREFIX will be considered.
Useful link
Contributing
Contributions are welcome!
To contribute:
- Fork the repository and create your branch (git checkout -b feature/my-feature).
- Commit your changes (git commit -m 'Add some feature').
- Push to the branch (git push origin feature/my-feature).
- Open a pull request.
For major changes, please open an issue first to discuss your proposal.
Please ensure that tests are added or updated as appropriate.
License
Licensed under either of the following, at your option: