monochromium 0.1.0

A fast, local-first CLI note-taking app for developers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::utils::get_paste;

pub fn string_check(text: Option<String>, paste: bool) -> String {
    let full_text: String;
    if text == None {
        if paste {
            full_text = get_paste();
        } else {
            return "Please provide a message when making your note!".to_string();
        }
    } else {
        full_text = text.clone().unwrap();
    }

    full_text
}