How do I type cast interface responses?
How do I type cast interface responses?
Many methods in Gogram return interface types that can have multiple implementations. You need to use type assertions or type switches to access the concrete type.
Example 1: AttachMenuBots
TheAttachMenuBots interface has two possible implementations:Example 2: MessagesMessages
TheMessagesMessages interface has four possible implementations:Why am I getting 'min constructor' errors?
Why am I getting 'min constructor' errors?
This happens when Telegram assumes you already have the access hash for a peer and sends incomplete data. Enable caching to prevent this:See the Cache documentation for more details.
What Go version is needed?
What Go version is needed?
Go 1.18 or higher is required for generics support.
Is the library stable and production ready?
Is the library stable and production ready?
YES - Gogram is stable and being used in production by many projects.
What are the resource requirements?
What are the resource requirements?
- Goroutines: ~10 - 12 goroutines
- Memory: 10-20 MB RAM usage
Where can I get help or support?
Where can I get help or support?
Join the Telegram Support Group for help, questions, and discussions.
What proxy types are supported?
What proxy types are supported?
Gogram supports the following proxy types:
- SOCKS5
- SOCKS4
- HTTP/HTTPS
- MTProto (FakeTLS, Obfuscated, Classic)
What platforms are supported?
What platforms are supported?
Gogram is tested and works on:
- Linux
- Windows
- macOS
- ARM (Raspberry Pi, etc.)
- WebAssembly (WASM) - Use WebSocket connections