aboutsummaryrefslogtreecommitdiff
path: root/api/telegram/bot
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-03-08 01:42:11 +0700
committerShulhan <ms@kilabit.info>2024-03-09 01:10:24 +0700
commit8007793b86bac3ca0bf937fe246deae5ac46a503 (patch)
treef9297531956f219223b56b5d6730690af64a428c /api/telegram/bot
parent6653805a0949eafc4a478749842d61b12ef5916a (diff)
downloadpakakeh.go-8007793b86bac3ca0bf937fe246deae5ac46a503.tar.xz
lib/http: refactor of RegisterEndpoint and RegisterSSE to non-pointer
Once the endpoint registered, the caller should not able to changes any values on endpoint again.
Diffstat (limited to 'api/telegram/bot')
-rw-r--r--api/telegram/bot/bot.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/telegram/bot/bot.go b/api/telegram/bot/bot.go
index ce0321bd..c87546b3 100644
--- a/api/telegram/bot/bot.go
+++ b/api/telegram/bot/bot.go
@@ -388,7 +388,7 @@ func (bot *Bot) createServer() (err error) {
return fmt.Errorf("createServer: %w", err)
}
- epToken := &http.Endpoint{
+ var epToken = http.Endpoint{
Method: http.RequestMethodPost,
Path: "/" + bot.opts.Token,
RequestType: http.RequestTypeJSON,