blob: dfb3ea83eb8b33f35c1b5283add8a676b0c5fb7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
use super::errors::RuntimeError;
use super::{FightOutcome, LogResult, Opt};
use std::io;
pub mod formats;
pub mod aggregators;
pub mod pipeline;
use self::formats::Format;
use self::aggregators::Aggregator;
pub use self::pipeline::Pipeline;
/// Build an pipeline for the given command line options.
pub fn build_pipeline(opt: &Opt) -> Pipeline {
let stream = io::stdout();
let formatter: Box<dyn Format> = if opt.file_name_only {
Box::new(formats::FileOnly)
} else {
Box::new(formats::HumanReadable)
};
Pipeline::new(stream, formatter, aggregators::WriteThrough)
}
|