{"id":47834982,"url":"https://github.com/prilive-com/galigo","last_synced_at":"2026-04-03T20:29:24.281Z","repository":{"id":336958782,"uuid":"1141512079","full_name":"prilive-com/galigo","owner":"prilive-com","description":"Go library for Telegram Bot API","archived":false,"fork":false,"pushed_at":"2026-03-16T19:44:47.000Z","size":504,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-17T06:28:45.023Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/prilive-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-25T00:24:48.000Z","updated_at":"2026-03-09T23:38:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/prilive-com/galigo","commit_stats":null,"previous_names":["prilive-com/galigo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/prilive-com/galigo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prilive-com%2Fgaligo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prilive-com%2Fgaligo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prilive-com%2Fgaligo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prilive-com%2Fgaligo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prilive-com","download_url":"https://codeload.github.com/prilive-com/galigo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prilive-com%2Fgaligo/sbom","scorecard":{"id":1243081,"data":{"date":"2026-02-07T02:24:30Z","repo":{"name":"github.com/prilive-com/galigo","commit":"683455529ac1615494598ebcf5bbe6e8d5934714"},"scorecard":{"version":"v5.3.0","commit":"c22063e786c11f9dd714d777a687ff7c4599b600"},"score":5.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"project was created within the last 90 days. Please review its contents carefully","details":["Warn: Repository was created within the last 90 days."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dangerous-workflow"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: .github/SECURITY.md:1","Info: Found linked content: .github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/SECURITY.md:1","Info: Found text in security policy: .github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#security-policy"}},{"name":"CI-Tests","score":-1,"reason":"no pull request found","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#ci-tests"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yml:13","Info: topLevel 'contents' permission set to 'read': .github/workflows/fuzz.yml:24","Info: topLevel 'contents' permission set to 'read': .github/workflows/integration.yml:51","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:11","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:12","Info: topLevel 'contents' permission set to 'read': .github/workflows/security.yml:15","Warn: topLevel 'security-events' permission set to 'write': .github/workflows/security.yml:16","Info: topLevel 'actions' permission set to 'read': .github/workflows/security.yml:17","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#binary-artifacts"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#dependency-update-tool"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:112: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:119: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:132: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:134: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:154: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:156: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:178: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:180: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/fuzz.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/fuzz.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/fuzz.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/fuzz.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/fuzz.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/fuzz.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/fuzz.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/fuzz.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/fuzz.yml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/fuzz.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/fuzz.yml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/fuzz.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/integration.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:147: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/integration.yml:185: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/integration.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:112: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:119: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/scorecard.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/scorecard.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/scorecard.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/scorecard.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/scorecard.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/scorecard.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/scorecard.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/scorecard.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/security.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/security.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/security.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/security.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/security.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/security.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/security.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/security.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/security.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/security.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/security.yml:103: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/security.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/security.yml:106: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/security.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/prilive-com/galigo/stale.yml/main?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/release.yml:46","Info:   0 out of  37 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   8 third-party GitHubAction dependencies pinned","Info:   1 out of   2 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#sast"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: GoBuiltInFuzzer integration found: tg/fuzz_test.go:10","Info: GoBuiltInFuzzer integration found: tg/fuzz_test.go:31","Info: GoBuiltInFuzzer integration found: tg/fuzz_test.go:46","Info: GoBuiltInFuzzer integration found: tg/fuzz_test.go:61","Info: GoBuiltInFuzzer integration found: tg/fuzz_test.go:76"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#fuzzing"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#cii-best-practices"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#branch-protection"}},{"name":"Contributors","score":0,"reason":"project has 0 contributing companies or organizations -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/c22063e786c11f9dd714d777a687ff7c4599b600/docs/checks.md#contributors"}}]},"last_synced_at":"2026-02-07T18:54:00.074Z","repository_id":336958782,"created_at":"2026-02-07T18:54:00.074Z","updated_at":"2026-02-07T18:54:00.074Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31375767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-04-03T20:29:23.466Z","updated_at":"2026-04-03T20:29:24.261Z","avatar_url":"https://github.com/prilive-com.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# galigo\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/prilive-com/galigo.svg)](https://pkg.go.dev/github.com/prilive-com/galigo)\n[![CI](https://github.com/prilive-com/galigo/actions/workflows/ci.yml/badge.svg)](https://github.com/prilive-com/galigo/actions/workflows/ci.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/prilive-com/galigo)](https://goreportcard.com/report/github.com/prilive-com/galigo)\n[![codecov](https://codecov.io/gh/prilive-com/galigo/graph/badge.svg)](https://codecov.io/gh/prilive-com/galigo)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nA production-grade Go library for the Telegram Bot API with built-in resilience.\n\ngaligo is designed for high-load environments where reliability matters. Unlike libraries that treat errors as exceptional, galigo treats rate limits, network failures, and API instability as expected conditions — handling them automatically so you can focus on your bot's logic.\n\n## Features\n\n- **Resilient** — Circuit breaker prevents cascading failures; only trips on 5xx/network errors, not user errors\n- **Respectful** — Smart rate limiting with per-chat and global limits; auto-handles 429 Retry-After\n- **Secure** — Tokens auto-redacted from logs and error messages; TLS 1.2+ enforced\n- **Complete** — Full Telegram Bot API coverage including Stars, Gifts, Business, and Forum Topics\n- **Flexible** — Use the unified Bot type or import only `sender/` or `receiver/` packages\n- **Modern** — Built for Go 1.25+ with generics, iterators, and structured logging\n\n## Installation\n\n```bash\ngo get github.com/prilive-com/galigo\n```\n\n**Requirements:** Go 1.25 or later\n\n## Quick Start\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"log\"\n    \"os\"\n    \"os/signal\"\n    \"syscall\"\n\n    \"github.com/prilive-com/galigo\"\n)\n\nfunc main() {\n    bot, err := galigo.New(os.Getenv(\"TELEGRAM_BOT_TOKEN\"),\n        galigo.WithPolling(30, 100),\n        galigo.WithRetries(3),\n        galigo.WithRateLimit(30.0, 5),\n    )\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer bot.Close()\n\n    ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)\n    defer cancel()\n\n    if err := bot.Start(ctx); err != nil {\n        log.Fatal(err)\n    }\n\n    for update := range bot.Updates() {\n        if update.Message != nil {\n            bot.SendMessage(ctx, update.Message.Chat.ID,\n                \"Echo: \"+update.Message.Text)\n        }\n    }\n}\n```\n\n## Documentation\n\n| Resource | Description |\n|----------|-------------|\n| [API Reference](https://pkg.go.dev/github.com/prilive-com/galigo) | Full type and method documentation |\n| [Configuration Guide](./docs/configuration.md) | Circuit breaker, rate limiting, retry, and options |\n| [Error Handling](./docs/errors.md) | Sentinel errors and recommended actions |\n| [Architecture](./docs/architecture.md) | Goroutines, channels, and operational model |\n| [Examples](./examples/) | Working code for common patterns |\n| [Testing Guide](./docs/testing.md) | Integration testing with galigo-testbot |\n| [Telegram Bot API](https://core.telegram.org/bots/api) | Official Telegram documentation |\n\n### Examples\n\n- [Echo Bot](./examples/echo/) — Basic message handling\n- [Keyboards](./examples/keyboard/) — Inline keyboard interactions\n- [Webhooks](./examples/webhook/) — Production webhook setup\n\n## Compatibility\n\n| Component | Version | Notes |\n|-----------|---------|-------|\n| **Go** | 1.25+ | Uses generics, iter.Seq, log/slog |\n| **Telegram Bot API** | 8.0–9.5 | Stars, Gifts, Business, Checklists, Member Tags, Message Streaming |\n| **Platforms** | Linux, macOS, Windows | Pure Go, no CGO |\n\n### Supported API Methods\n\ngaligo implements **150+ methods** covering:\n\n- Messages, media, files, and albums\n- Inline keyboards and callback queries\n- Chat administration and moderation\n- Member tags and date/time entities (Bot API 9.5)\n- Message streaming via drafts (Bot API 9.5)\n- Forum topics and permissions\n- Stickers and custom emoji\n- Payments, Stars, and Gifts\n- Polls, quizzes, and giveaways\n- Webhooks and long polling\n\nFor the complete method list, see the [API Reference](https://pkg.go.dev/github.com/prilive-com/galigo/sender).\n\n## Thread Safety\n\n| Component | Safe | Notes |\n|-----------|------|-------|\n| `galigo.Bot` | ✅ | All methods safe for concurrent use |\n| `sender.Client` | ✅ | Designed for high-concurrency |\n| `receiver.PollingClient` | ✅ | Single goroutine fetches, multiple can consume |\n| `tg.Update` | ✅ | Immutable after creation |\n\n### Close() Idempotency\n\nBoth `Bot.Close()` and `sender.Client.Close()` are idempotent — safe to call multiple times or concurrently without panicking. This is important for:\n\n- `defer bot.Close()` combined with explicit shutdown paths\n- Graceful shutdown handlers that may race with other cleanup code\n- Error recovery scenarios\n\n```go\nbot, _ := galigo.New(token)\ndefer bot.Close()  // Safe even if Close() called elsewhere\n\n// ... later in shutdown handler ...\nbot.Close()  // No panic, just a no-op\n```\n\n**Webhook mode note:** In webhook mode, `Bot.Close()` does *not* close the updates channel because HTTP handlers may still be sending updates. Stop your HTTP server first, then call `Close()`.\n\n## Error Handling\n\ngaligo provides typed errors for precise handling:\n\n```go\nimport (\n    \"errors\"\n    \"github.com/prilive-com/galigo/tg\"\n)\n\n_, err := bot.SendMessage(ctx, chatID, text)\nif err != nil {\n    switch {\n    case errors.Is(err, tg.ErrBotBlocked):\n        // User blocked the bot — remove from database\n    case errors.Is(err, tg.ErrTooManyRequests):\n        // Rate limited — already retried, consider backing off\n    case errors.Is(err, tg.ErrMessageNotFound):\n        // Message was deleted — update local state\n    case errors.Is(err, tg.ErrCircuitOpen):\n        // Circuit breaker open — Telegram API may be down\n    default:\n        var apiErr *tg.APIError\n        if errors.As(err, \u0026apiErr) {\n            log.Printf(\"API error %d: %s\", apiErr.Code, apiErr.Description)\n        }\n    }\n}\n```\n\n### Error Reference\n\n| Error | When |\n|-------|------|\n| `ErrBotBlocked` | User blocked the bot |\n| `ErrBotKicked` | Bot removed from group |\n| `ErrChatNotFound` | Chat doesn't exist |\n| `ErrMessageNotFound` | Message was deleted |\n| `ErrMessageNotModified` | Edit had no changes |\n| `ErrTooManyRequests` | Rate limited (429) |\n| `ErrUnauthorized` | Invalid bot token |\n| `ErrForbidden` | Missing permissions |\n| `ErrCircuitOpen` | Circuit breaker tripped |\n| `ErrMaxRetries` | All retry attempts failed |\n\n## Configuration\n\n### Bot Options\n\n```go\nbot, err := galigo.New(token,\n    // Receiving mode (choose one)\n    galigo.WithPolling(30, 100),          // Long polling\n    galigo.WithWebhook(8443, \"secret\"),   // Webhook\n\n    // Resilience\n    galigo.WithRetries(3),                // Max retry attempts\n    galigo.WithRateLimit(30.0, 5),        // Global: 30 req/s, burst 5\n\n    // Behavior\n    galigo.WithLogger(slog.Default()),    // Custom logger\n    galigo.WithAllowedUpdates(\"message\", \"callback_query\"),\n)\n```\n\n### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `TELEGRAM_BOT_TOKEN` | — | Bot token from @BotFather |\n\nFor advanced configuration, see the [sender](https://pkg.go.dev/github.com/prilive-com/galigo/sender#Config) and [receiver](https://pkg.go.dev/github.com/prilive-com/galigo/receiver#Config) package documentation.\n\n## Modular Usage\n\nUse only the packages you need:\n\n```go\n// Only sending messages\nimport \"github.com/prilive-com/galigo/sender\"\n\nclient, _ := sender.New(token, sender.WithRetries(3))\nclient.SendMessage(ctx, sender.SendMessageRequest{\n    ChatID: chatID,\n    Text:   \"Hello!\",\n})\n\n// Only receiving updates\nimport \"github.com/prilive-com/galigo/receiver\"\n\nupdates := make(chan tg.Update, 100)\npoller := receiver.NewPollingClient(token, updates, logger, cfg)\npoller.Start(ctx)\n```\n\n## Resilience\n\n### Circuit Breaker\n\nPrevents cascading failures when Telegram is unavailable:\n\n- Opens after 50% failure rate (minimum 3 requests in 60s window)\n- Half-open state after 30s timeout\n- Only server errors (5xx) and network errors trip the breaker\n- Client errors (4xx) never trip — prevents self-inflicted outages\n\n### Rate Limiting\n\nRespects Telegram's limits automatically:\n\n- **Global:** 30 requests/second (configurable)\n- **Per-chat:** 1 request/second per chat (configurable)\n- **429 handling:** Reads `retry_after` from response, waits automatically\n\n### Retry Strategy\n\nTransient failures are retried with exponential backoff:\n\n- Base wait: 500ms → 1s → 2s → 4s (capped at 30s)\n- Cryptographic jitter prevents thundering herd\n- Only retries network errors and 5xx responses\n\n## Testing\n\n```bash\n# Unit tests\ngo test ./...\n\n# With race detector\ngo test -race ./...\n\n# With coverage\ngo test -coverprofile=coverage.out ./...\n```\n\n### Integration Tests\n\ngaligo includes a testbot for validating against the real Telegram API:\n\n```bash\nexport TESTBOT_TOKEN=\"your-token\"\nexport TESTBOT_CHAT_ID=\"your-chat-id\"\nexport TESTBOT_ADMINS=\"your-user-id\"\n\ngo run ./cmd/galigo-testbot --run all\n```\n\nSee [docs/testing.md](./docs/testing.md) for complete testing documentation.\n\n## Dependencies\n\n| Package | Purpose |\n|---------|---------|\n| [`sony/gobreaker/v2`](https://github.com/sony/gobreaker) | Circuit breaker |\n| [`golang.org/x/time`](https://pkg.go.dev/golang.org/x/time/rate) | Rate limiting |\n\nTesting only: `stretchr/testify`\n\n## Contributing\n\nContributions are welcome! Please:\n\n1. Read the [Contributing Guide](CONTRIBUTING.md)\n2. Ensure tests pass: `go test ./...`\n3. Run linter: `golangci-lint run`\n4. Follow existing code style\n\n## Security\n\nFound a vulnerability? Please report it privately:\n\n- Use [GitHub's private vulnerability reporting](https://github.com/prilive-com/galigo/security)\n- See [SECURITY.md](.github/SECURITY.md) for our security policy\n\n**Do not** open public issues for security vulnerabilities.\n\n## License\n\n[MIT License](LICENSE) — use freely in personal and commercial projects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprilive-com%2Fgaligo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprilive-com%2Fgaligo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprilive-com%2Fgaligo/lists"}