Source File
cfg.go
Belonging Package
github.com/gotd/td/telegram
package telegram
import (
)
// Available MTProto default server addresses.
//
// See https://my.telegram.org/apps.
const (
AddrProduction = "149.154.167.50:443"
AddrTest = "149.154.167.40:443"
)
// Test-only credentials. Can be used with AddrTest and TestAuth to
// test authentication.
//
// Reference:
// - https://github.com/telegramdesktop/tdesktop/blob/5f665b8ecb48802cd13cfb48ec834b946459274a/docs/api_credentials.md
const (
TestAppID = constant.TestAppID
TestAppHash = constant.TestAppHash
)
// Config returns current config.
func ( *Client) () tg.Config {
return .cfg.Load()
}
func ( *Client) ( context.Context) {
, := .tg.HelpGetConfig()
if != nil {
.log.Warn("Got error on config update", zap.Error())
return
}
.cfg.Store(*)
}
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |