Popularity
0.7
Stable
Activity
0.0
Declining
6
1
1

Programming language: Go
License: MIT License
Tags: Utilities    

go-safe alternatives and similar packages

Based on the "Utilities" category.
Alternatively, view go-safe alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of go-safe or a related project?

Add another 'Utilities' Package

README

go-safe

test codecov go.dev reference go report card [license](LICENSE)

Provides a sandbox where functions can be executed panically safe.

Installation

go get -u github.com/kenkyu392/go-safe

Usage

package main

import (
    "log"

    "github.com/kenkyu392/go-safe"
)

func main() {
    // The panic that occurs in the function is automatically handled as an error.
    if err := safe.Do(func() error {
        // Do something...
        return nil
    }); err != nil {
        log.Fatal(err)
    }
}

License

[MIT](LICENSE)


*Note that all licence references and agreements mentioned in the go-safe README section above are relevant to that project's source code only.