feat: add pkgr global config

This commit is contained in:
Strix 2023-10-14 22:39:44 +02:00
parent 6981fe8f16
commit 401efe3862
No known key found for this signature in database
GPG key ID: 49B2E37B8915B774
3 changed files with 20 additions and 11 deletions

View file

@ -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,
}
}
}