golangify 1.4.24

published at 01.04.2024 this crate brings familiar flavor for newcomers from golang
Documentation
  • Coverage
  • 71.43%
    5 out of 7 items documented2 out of 4 items with examples
  • Size
  • Source code size: 4.26 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 577.36 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • klebed

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