mtproto: Bug: api methods doesn't generate properly
- ОС windows 10
- go version go1.14 windows/amd64
взял пример https://github.com/xelaj/mtproto/tree/master/examples/auth (добавил go.mod)
выполнил go get github.com/xelaj/mtproto
, при выполнении go generate github.com/xelaj/mtproto
выводится сообщение
go: not generating in packages in dependency modules
при сборки тестового примера получаю такое сообщение
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\common.go:71:19: undefined: InputClientProxy
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\common.go:72:18: undefined: JSONValue
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\decoder_constructors.go:16:11: undefined: InputGameShortName
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\decoder_constructors.go:18:11: undefined: PageListOrderedItemText
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\decoder_constructors.go:20:11: undefined: UpdateBotInlineSend
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\decoder_constructors.go:22:11: undefined: SecureValueErrorFile
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\functions.go:26:15: undefined: CodeSettings
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\functions.go:43:88: undefined: CodeSettings
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\functions.go:43:104: undefined: AuthSentCode
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\functions.go:82:76: undefined: AuthAuthorization
D:\GoMy\src\pkg\mod\github.com\xelaj\mtproto@v0.0.0-20201004140927-b24d2217ce69\telegram\decoder_constructors.go:22:11: too many errors
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (4 by maintainers)
насчет пароля я понял, это из-за включенной у меня двухэтапной аутентификации
Thanks, it looks better. Still need to try it out, but there is still an issue with this code in
telegram/common.go
:`func init() { keyfile := “~/go/src/github.com/xelaj/mtproto/keys/keys.pem” TelegramPublicKeys, err := keys.ReadFromFile(keyfile) dry.PanicIfErr(err) choosedKey := dry.RandomChoose(dry.InterfaceSlice(TelegramPublicKeys)…).(*rsa.PublicKey)
}`
It errors because i don’t have they key in that location and looking at the code it seems to be a test that doesn’t do anything? Haven’t made the whole thing work yet but get past this error if i comment this out.
No problem! I wasn’t expecting it to work already to be honest as it was such a new project. But thanks a lot!