Fix tests

This commit is contained in:
9seconds
2026-02-24 13:58:16 +01:00
parent 8b34c1b104
commit 5b91edf5c4
6 changed files with 95 additions and 109 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ type PublicConfigUpdater struct {
tg *Telegram
}
func (p PublicConfigUpdater) Run(ctx context.Context, url, network string) {
func (p *PublicConfigUpdater) Run(ctx context.Context, url, network string) {
p.run(ctx, func() error {
req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
if err != nil {
@@ -81,8 +81,8 @@ func (p PublicConfigUpdater) Run(ctx context.Context, url, network string) {
})
}
func NewPublicConfigUpdater(tg *Telegram, logger Logger, client *http.Client) PublicConfigUpdater {
return PublicConfigUpdater{
func NewPublicConfigUpdater(tg *Telegram, logger Logger, client *http.Client) *PublicConfigUpdater {
return &PublicConfigUpdater{
updater: updater{
logger: logger,
period: PublicConfigUpdateEach,