mtg-price-bot/internal/vk/test_cache.go
2021-02-06 22:36:51 +03:00

19 lines
325 B
Go

package vk
import "errors"
type testCache struct {
table map[string]string
}
func (t *testCache) Get(cardName string) (string, error) {
msg, ok := t.table[cardName]
if !ok {
return "", errors.New("test")
}
return msg, nil
}
func (t *testCache) Set(cardName string, message string) {
t.table[cardName] = message
}