{"id":52505,"library":"markbates-safe","title":"Safe Execution","description":"Package safe provides a helper to safely execute functions and recover from panics.","status":"active","version":"1.1.0","language":"go","source_language":null,"source_url":"https://github.com/markbates/safe","tags":["panic","recover","safety","utility"],"install":[{"cmd":"go get github.com/markbates/safe","lang":"bash","label":"Install github.com/markbates/safe"}],"dependencies":[],"imports":[{"symbol":"safe","correct":"github.com/markbates/safe"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/markbates/safe\"\n)\n\nfunc main() {\n\terr := safe.Run(func() error {\n\t\tpanic(\"oops\")\n\t})\n\tfmt.Println(err)\n}","lang":"go","description":"Run a function safely, recovering from panics"},"warnings":[],"env_vars":null,"search_vec":"'execut':2,10 'function':11 'helper':7 'packag':3 'panic':15,16 'provid':5 'recov':13,17 'safe':1,4,9 'safeti':18 'util':19","created_at":"2026-06-15T06:56:46.895259+00:00","updated_at":"2026-06-15T06:56:46.895259+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/markbates/safe","github":"https://github.com/markbates/safe","docs":"https://pkg.go.dev/github.com/markbates/safe#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}