aboutsummaryrefslogtreecommitdiff
path: root/api/telegram/bot
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-03-02 18:28:58 +0700
committerShulhan <ms@kilabit.info>2024-03-05 14:53:03 +0700
commitb921ebfb3e81b367ff24305eb18c5dd073b38635 (patch)
tree89c88e32ad92af2ade65dec6552ddd06ddc0cd90 /api/telegram/bot
parent901c9803e6f93e0d5ee282f4061309022c46f490 (diff)
downloadpakakeh.go-b921ebfb3e81b367ff24305eb18c5dd073b38635.tar.xz
all: comply with linter recommendations #1
Instead of annotating the lines that caught by linters, fix it to comply with the recommendations. This causes several breaking changes, especially related to naming, * api/slack: [Message.IconUrl] become [Message.IconURL] * lib/dns: DefaultSoaMinumumTtl become DefaultSoaMinimumTTL * lib/email: [Message.SetBodyHtml] become [Message.SetBodyHTML] * lib/http: [Client.GenerateHttpRequest] become [Client.GenerateHTTPRequest] * lib/http: [ClientOptions.ServerUrl] become [ClientOptions.ServerURL] * lib/http: [EndpointRequest.HttpWriter] become [EndpointRequest.HTTPWriter] * lib/http: [EndpointRequest.HttpRequest] become [EndpointRequest.HTTPRequest] * lib/http: [ServerOptions.EnableIndexHtml] become [ServerOptions.EnableIndexHTML] * lib/http: [SSEConn.HttpRequest] become [SSEConn.HTTPRequest] * lib/smtp: [ClientOptions.ServerUrl] become [ClientOptions.ServerURL] * lib/ssh/sftp: [FileAttrs.SetUid] become [FileAttrs.SetUID] * lib/ssh/sftp: [FileAttrs.Uid] become [FileAttrs.UID]
Diffstat (limited to 'api/telegram/bot')
-rw-r--r--api/telegram/bot/bot.go2
-rw-r--r--api/telegram/bot/passport_data.go4
2 files changed, 1 insertions, 5 deletions
diff --git a/api/telegram/bot/bot.go b/api/telegram/bot/bot.go
index f0e2c009..2f237489 100644
--- a/api/telegram/bot/bot.go
+++ b/api/telegram/bot/bot.go
@@ -110,7 +110,7 @@ func New(opts Options) (bot *Bot, err error) {
}
clientOpts := &http.ClientOptions{
- ServerUrl: defURL + opts.Token + "/",
+ ServerURL: defURL + opts.Token + `/`,
}
bot = &Bot{
opts: opts,
diff --git a/api/telegram/bot/passport_data.go b/api/telegram/bot/passport_data.go
index e7d9d271..3c3d077b 100644
--- a/api/telegram/bot/passport_data.go
+++ b/api/telegram/bot/passport_data.go
@@ -9,8 +9,4 @@ package bot
type PassportData struct {
// Encrypted credentials required to decrypt the data.
Credentials EncryptedCredentials
-
- // Array with information about documents and other Telegram Passport
- // elements that was shared with the bot.
- data []EncryptedPassportElement //nolint: structcheck,unused
}