golangify

Crates.iogolangify
lib.rsgolangify
version1.4.24
sourcesrc
created_at2024-04-01 10:25:43.145885
updated_at2024-04-01 11:40:41.91746
descriptionpublished at 01.04.2024 this crate brings familiar flavor for newcomers from golang
homepage
repository
max_upload_size
id1192390
size4,584
(klebed)

documentation

README

golangify

golangify macro would turn standard rust Result<T,E> into simple, familiar and convenient tuple (T,E);

Example usage

use golangify::*;

fn main() {
    let (res, err) = golangify!(some_func());
    if err != nil {
        println!("{:?}", err);
    }
}

fn some_func() -> Result<u32, &'static str> {
    Err("42")
}

01.04.2024

Commit count: 0

cargo fmt