names fix
This commit is contained in:
@@ -52,7 +52,7 @@ func TestSendTable(t *testing.T) {
|
|||||||
{"Слива Абрикосы Абрикосы", "100", "10", "0.5"},
|
{"Слива Абрикосы Абрикосы", "100", "10", "0.5"},
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := notify.BuildTelegramHTMLTable(rows)
|
msg := notify.BuildTelegramTable(rows)
|
||||||
|
|
||||||
conf := loadConfig(t)
|
conf := loadConfig(t)
|
||||||
bot, err := notify.NewTelegram(conf.Token, true)
|
bot, err := notify.NewTelegram(conf.Token, true)
|
||||||
|
|||||||
2
tools.go
2
tools.go
@@ -41,7 +41,7 @@ func padLeftVisual(s string, width int) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BuildTelegramBoxTable строит ASCII-таблицу с рамками для Telegram HTML <pre>
|
// BuildTelegramBoxTable строит ASCII-таблицу с рамками для Telegram HTML <pre>
|
||||||
func BuildTelegramHTMLTable(rows [][]string) string {
|
func BuildTelegramTable(rows [][]string) string {
|
||||||
if len(rows) == 0 {
|
if len(rows) == 0 {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,6 @@ func TestCreateTable(t *testing.T) {
|
|||||||
{"Киви", "+200", "1", "-1.2"},
|
{"Киви", "+200", "1", "-1.2"},
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := notify.BuildTelegramHTMLTable(rows)
|
msg := notify.BuildTelegramTable(rows)
|
||||||
log.Println(msg)
|
log.Println(msg)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user