feat: add pkgr global config
This commit is contained in:
parent
6981fe8f16
commit
401efe3862
3 changed files with 20 additions and 11 deletions
|
@ -6,6 +6,14 @@ pub struct Config {
|
|||
pub build_by_default: bool,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
fn default() -> Config {
|
||||
Config {
|
||||
build_by_default: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn from_path(path: &str) -> Result<Config, String> {
|
||||
match std::fs::read_to_string(path) {
|
||||
|
@ -17,11 +25,3 @@ impl Config {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
fn default() -> Config {
|
||||
Config {
|
||||
build_by_default: false,
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue