🐛 fix(cli): correct output format for label list
- change the output format for label list from logging to printing to the console - modify the loop logic to output labels in a comma-separated format
This commit is contained in:
committed by
Jeremiah Russell
parent
0a537e4df7
commit
d6ee9f5227
@@ -15,10 +15,15 @@ impl ListCli {
|
|||||||
return Err(Error::RuleNotFound(self.id));
|
return Err(Error::RuleNotFound(self.id));
|
||||||
};
|
};
|
||||||
|
|
||||||
for label in rule.labels() {
|
print!("Labels in rule: ");
|
||||||
log::info!("Label in rule: `{label}`");
|
for (i, label) in rule.labels().iter().enumerate() {
|
||||||
|
if i != 0 {
|
||||||
|
print!(", {label}");
|
||||||
|
} else {
|
||||||
|
print!("`{label}");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
println!("`");
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user