diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-07 19:37:52 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-07 19:37:52 +0800 |
| commit | 9e7c0fd45e169929156bdb317b10d7bb3db65f8b (patch) | |
| tree | 94c1e0e6cafe996b7b7da8dfd6e1ff1a04539cda /src/chunker/entry.rs | |
| parent | 22926ce29e3f8e040ec349401aeb6a77f32eae72 (diff) | |
Add callback support to chunk_stream_with and implement stream writing
Diffstat (limited to 'src/chunker/entry.rs')
| -rw-r--r-- | src/chunker/entry.rs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/chunker/entry.rs b/src/chunker/entry.rs deleted file mode 100644 index 4fdb1f8..0000000 --- a/src/chunker/entry.rs +++ /dev/null @@ -1,39 +0,0 @@ -use std::process::exit; - -use log::info; - -use crate::chunker::{ - context::ButckContext, - rw::{self, error::ButckRWError}, -}; - -pub async fn entry(ctx: ButckContext, args: Vec<String>) -> Result<(), ButckRWError> { - if let Some(subcommand) = args.first() { - return match subcommand.as_str() { - "write" => rw::storage::write(ctx).await, - "build" => rw::storage::build(ctx).await, - "policies" => { - butck_policies::policies() - .iter() - .for_each(|p| info!("{}", p)); - return Ok(()); - } - _ => { - print_help(); - exit(1) - } - }; - } - Ok(()) -} - -pub fn print_help() { - println!("{}", include_str!("../../resources/helps/butck.txt").trim()); -} - -pub fn print_version() { - println!( - "{}", - include_str!("../../resources/version_info.txt").trim() - ); -} |
