{"id":21807315,"url":"https://github.com/akramarenkov/safe","last_synced_at":"2025-04-13T20:43:12.728Z","repository":{"id":179760960,"uuid":"664092030","full_name":"akramarenkov/safe","owner":"akramarenkov","description":"Library that provides to detect and avoid overflows in operations with integer numbers","archived":false,"fork":false,"pushed_at":"2025-04-03T02:44:59.000Z","size":1849,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T03:27:28.239Z","etag":null,"topics":["go","golang","integer","overflow"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akramarenkov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2023-07-08T22:23:47.000Z","updated_at":"2025-04-03T02:45:02.000Z","dependencies_parsed_at":"2023-12-27T21:21:02.114Z","dependency_job_id":"fc91aebb-9a00-49b0-8c6e-f36100004eb0","html_url":"https://github.com/akramarenkov/safe","commit_stats":null,"previous_names":["akramarenkov/safe"],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akramarenkov%2Fsafe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akramarenkov%2Fsafe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akramarenkov%2Fsafe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akramarenkov%2Fsafe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akramarenkov","download_url":"https://codeload.github.com/akramarenkov/safe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248782283,"owners_count":21160716,"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","integer","overflow"],"created_at":"2024-11-27T12:39:24.280Z","updated_at":"2025-04-13T20:43:12.718Z","avatar_url":"https://github.com/akramarenkov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Safe\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/akramarenkov/safe.svg)](https://pkg.go.dev/github.com/akramarenkov/safe)\n[![Go Report Card](https://goreportcard.com/badge/github.com/akramarenkov/safe)](https://goreportcard.com/report/github.com/akramarenkov/safe)\n[![Coverage Status](https://coveralls.io/repos/github/akramarenkov/safe/badge.svg)](https://coveralls.io/github/akramarenkov/safe)\n\n## Purpose\n\nLibrary that provides to detect and avoid overflows in operations with integer numbers\n\n## Usage\n\nExample:\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/akramarenkov/safe\"\n)\n\nfunc main() {\n    sum, err := safe.Add[int8](124, 3)\n    fmt.Println(err)\n    fmt.Println(sum)\n\n    sum, err = safe.Add[int8](125, 3)\n    fmt.Println(err)\n    fmt.Println(sum)\n    // Output:\n    // \u003cnil\u003e\n    // 127\n    // integer overflow\n    // 0\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakramarenkov%2Fsafe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakramarenkov%2Fsafe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakramarenkov%2Fsafe/lists"}