Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.