精简: 去掉 Telegram 机器人+通知: tgbot 包/stats-notify 与 hash 清理 job/登录通知/backuptotgbot/testTgBot/全部 tg* 设置/locale Bot 本地化/SecretClears 机制; 连带清理 Swagger/外部流量/邮件/2FA 的残留测试
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
package tgbot
|
||||
|
||||
// updateNumericInput applies one number-pad key: -2 clears, -1 backspaces, and 0..9 append.
|
||||
// Callers retain their own validation and keyboard labels.
|
||||
func updateNumericInput(value, key int) int {
|
||||
switch key {
|
||||
case -2:
|
||||
return 0
|
||||
case -1:
|
||||
if value > 0 {
|
||||
return value / 10
|
||||
}
|
||||
return value
|
||||
default:
|
||||
return value*10 + key
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user