refactor: move config list

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-08-01 17:01:00 +02:00
parent e51454088e
commit ae9073bf0b
8 changed files with 93 additions and 58 deletions

View File

@@ -1,4 +1,7 @@
use std::path::{Path, PathBuf};
use std::{
fmt::Display,
path::{Path, PathBuf},
};
pub mod gatheres;
mod stage0_config;
@@ -42,6 +45,18 @@ impl PleaseConfig {
}
}
impl Display for PleaseConfig {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
writeln!(f, "PleaseConfig")?;
writeln!(f, " owner: {}", self.get_owner())?;
writeln!(f, " repository: {}", self.get_repository())?;
writeln!(f, " branch: {}", self.get_branch())?;
writeln!(f, " api_url: {}", self.get_api_url())?;
Ok(())
}
}
#[derive(Clone, Debug, Default)]
pub struct PleaseConfigBuilder {
stdin: Option<stage0_config::PleaseConfigBuilder>,