Added different formatting for telegram bot
This commit is contained in:
parent
35f8fa5a57
commit
89623f5f6a
18 changed files with 233 additions and 173 deletions
|
|
@ -1,19 +1,23 @@
|
|||
package scenario
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"gitlab.com/flygrounder/go-mtg-vk/internal/cardsinfo"
|
||||
)
|
||||
|
||||
type testCache struct {
|
||||
table map[string]string
|
||||
table map[string][]cardsinfo.ScgCardPrice
|
||||
}
|
||||
|
||||
func (t *testCache) Get(cardName string) (string, error) {
|
||||
func (t *testCache) Get(cardName string) ([]cardsinfo.ScgCardPrice, error) {
|
||||
msg, ok := t.table[cardName]
|
||||
if !ok {
|
||||
return "", errors.New("test")
|
||||
return nil, errors.New("test")
|
||||
}
|
||||
return msg, nil
|
||||
}
|
||||
|
||||
func (t *testCache) Set(cardName string, message string) {
|
||||
t.table[cardName] = message
|
||||
func (t *testCache) Set(cardName string, prices []cardsinfo.ScgCardPrice) {
|
||||
t.table[cardName] = prices
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue