| Crates.io | golangify |
| lib.rs | golangify |
| version | 1.4.24 |
| created_at | 2024-04-01 10:25:43.145885+00 |
| updated_at | 2024-04-01 11:40:41.91746+00 |
| description | published at 01.04.2024 this crate brings familiar flavor for newcomers from golang |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1192390 |
| size | 4,584 |
golangify macro would turn standard rust Result<T,E> into simple, familiar and convenient tuple (T,E);
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