monobank-firefly3-bot/config/helpers.go

22 lines
347 B
Go
Raw Permalink Normal View History

2024-04-12 13:00:28 +03:00
package config
func (c *Config) GetAccountByMonobankId(q string) Account {
2024-04-12 13:00:28 +03:00
for _, row := range c.Accounts {
if row.MonobankId == q {
return row
}
}
return Account{}
2024-04-12 13:00:28 +03:00
}
func (c *Config) GetAccountByFirefly3Name(q string) Account {
for _, row := range c.Accounts {
if row.Firefly3Name == q {
return row
}
}
return Account{}
}