slippy-cli 0.1.0

AI Linter for Rust projects
use std::io::Read;

fn main() {
    let mut input_string = String::new();
    std::io::stdin().read_line(&mut input_string).unwrap();
    let (role, message) = input_string.split_once(":").unwrap();
    check_authorized(role);
    println!("Message: {}", message);
}

fn check_authorized(role: &str) -> bool {
    if role == "system" {
        println!("Hello System");
        return true;
    } else if role == "admin" {
        println!("Hello Admin");
        return true;
    } else if role == "user" {
        panic!("Unauthorized");
        return false;
    } else {
        panic!("Invalid role")
    }
}