Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Signed-off-by: Howard <[email protected]>
  • Loading branch information
howard-oc authored Apr 23, 2024
1 parent ab0f360 commit b85694b
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,40 @@ Kratix-Utils is a ready-to-run collection of functions that help to fullfil a pr

The goal of kratix_utils is to help you establish best practices and consistent formatting across multiple promises, and ensure developers are adhering to those conventions.

### How to use kratix_utils
```bash
cd internal/configure-pipeline
cargo new sample
```
### In the main.rs include a call to run_pipeline
```bash
use log::LevelFilter;
use log4rs::append::console::ConsoleAppender;
use log4rs::config::{Appender, Root};
use log4rs::Config;
use std::{env, process};

Kratix Utils is licensed under a MIT License.
fn main() {
let stdout = ConsoleAppender::builder().build();
let config = Config::builder()
.appender(Appender::builder().build("stdout", Box::new(stdout)))
.build(Root::builder().appender("stdout").build(LevelFilter::Trace))
.unwrap();

let _handle = log4rs::init_config(config).unwrap();

let args: Vec<String> = env::args().collect();

// TODO: pass function to do IOC transform
match args[1].as_str() {
"pipeline" => kratix_utils::run_pipeline(args),
_ => {
log::warn!("Unknown command: {}", args[1]);
process::exit(1);
}
}
}
```


Kratix Utils is licensed under a MIT License.

0 comments on commit b85694b

Please sign in to comment.