EnvVar
EnvVar is a Rust library for retrieving environment variables from different file types.
Supported File Types
- Simple txt files (.txt, .env)
- JSON files (.json)
Installation
Add the following to your Cargo.toml file:
[]
= "0.1.0"
Examples
Examples with debug
use EnvHolder;
// With debug flag set to true
let env_holder = new;
let url = env_holder.get_var;
if let Some = url
Examples without debug with and a custom file_name
use EnvHolder;
// With debug flag set to true
let env_holder = new.with_file_name;
let url = env_holder.get_var;
if let Some = url
Contributing
Contributions are welcome! If you find a bug, have a feature request, or would like to contribute to the project, please feel free to open an issue or submit a pull request. Your feedback and contributions help make this library better for everyone.