parse_dotenv

Function parse_dotenv 

Source
pub fn parse_dotenv(
    source: &str,
) -> Result<BTreeMap<String, String>, Box<dyn Error + Send + Sync>>
Expand description

Parse the .env file source.

Examples found in repository?
examples/complete.rs (line 10)
3fn main() {
4    let source = r#"
5        ENV_FOR_HYDRO='testing 2' # another one here
6        export USER_ID=5gpPN5rcv5G41U_S
7        API_TOKEN=30af563ccc668bc8ced9e24e  # relax! these values are fake
8        APP_SITE_URL=https://my.example.com
9    "#;
10    println!("{:#?}", parse_dotenv(source).unwrap());
11}