{"id":16930368,"url":"https://github.com/alexpantyukhin/go-try-catch","last_synced_at":"2025-03-21T03:23:52.427Z","repository":{"id":77360562,"uuid":"182986411","full_name":"alexpantyukhin/go-try-catch","owner":"alexpantyukhin","description":"try-catch block for Go","archived":false,"fork":false,"pushed_at":"2019-04-24T20:08:29.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T00:11:24.284Z","etag":null,"topics":["go","golang","try","try-catch"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexpantyukhin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-23T09:57:05.000Z","updated_at":"2019-04-24T20:09:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"83db83be-bb80-4cb9-a74d-92e1124cc2f9","html_url":"https://github.com/alexpantyukhin/go-try-catch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexpantyukhin%2Fgo-try-catch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexpantyukhin%2Fgo-try-catch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexpantyukhin%2Fgo-try-catch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexpantyukhin%2Fgo-try-catch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexpantyukhin","download_url":"https://codeload.github.com/alexpantyukhin/go-try-catch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244729281,"owners_count":20500221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","try","try-catch"],"created_at":"2024-10-13T20:41:31.199Z","updated_at":"2025-03-21T03:23:52.395Z","avatar_url":"https://github.com/alexpantyukhin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go try-catch\n[![Build Status](https://travis-ci.org/alexpantyukhin/go-try-catch.svg?branch=master\n)](https://travis-ci.org/alexpantyukhin/go-try-catch)\n[![GoDoc](https://godoc.org/alexpantyukhin/go-try-catch?status.svg)](https://godoc.org/github.com/alexpantyukhin/go-try-catch)\n\n# Motivation\nALL LANGUAGES SHOULD LOOK LIKE C#))) If you are still there then.. don't worry it's a joke) But many a true word is spoken in jest. This repository was made for fun. I don't want to get some lib which will be used in some real systems making this project. My advise: DON'T USE IT IN REAL PROJECTS :).\n\n# Usages\nIt's possible to try use try-catch:\n\n```go\n\tTry(func() {\n\t\tfmt.Println(\"Hello Try! Let's get some fun!\")\n\t\tRaiseError(\u0026Error{\"Oh no! something went wrong! Let's get out of here!!!\"})\n\t}).\n\tCatch(func(err *Error) {\n\t\tfmt.Println(\"Hehe... So good we have Catch there.\")\n\t}).\n\tFinally(func(){\n\t\tfmt.Println(\"Roll up, time to go home.\")\n\t}).\n\tDo()\n```\n\n\n# Installation\nJust `go get` this repository with the following way:\n\n```\ngo get github.com/alexpantyukhin/go-try-catch\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexpantyukhin%2Fgo-try-catch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexpantyukhin%2Fgo-try-catch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexpantyukhin%2Fgo-try-catch/lists"}