change env variables
parent
bc23ddceeb
commit
fc419b5c40
|
@ -1,8 +1,8 @@
|
||||||
use std::env;
|
use clap::{load_yaml, App};
|
||||||
use clap::{App, load_yaml};
|
|
||||||
use directories::BaseDirs;
|
use directories::BaseDirs;
|
||||||
use dotenv;
|
use dotenv;
|
||||||
use sprintf::sprintf;
|
use sprintf::sprintf;
|
||||||
|
use std::env;
|
||||||
|
|
||||||
pub struct Params {
|
pub struct Params {
|
||||||
pub source_lang: String,
|
pub source_lang: String,
|
||||||
|
@ -33,8 +33,8 @@ impl Params {
|
||||||
Self {
|
Self {
|
||||||
source_lang: matches.value_of("source").unwrap_or("0").to_string(),
|
source_lang: matches.value_of("source").unwrap_or("0").to_string(),
|
||||||
target_lang: matches.value_of("target").unwrap_or("EN-US").to_string(),
|
target_lang: matches.value_of("target").unwrap_or("EN-US").to_string(),
|
||||||
key: env::var("key").unwrap(),
|
key: env::var("KEY").unwrap(),
|
||||||
uri: env::var("uri").unwrap(),
|
uri: env::var("URI").unwrap(),
|
||||||
text: matches.value_of("INPUT").unwrap().to_string(),
|
text: matches.value_of("INPUT").unwrap().to_string(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue