From a7e789fe56cbb2896b6483676e219b1aad7dc3b5 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 23 Aug 2022 18:44:13 +0300 Subject: [PATCH] Swap key/value parameters for setBooleanConfigurationKey() Not that it matters much, but it's more consistent. --- bot/mailbox.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/mailbox.go b/bot/mailbox.go index c48568a..ad6de70 100644 --- a/bot/mailbox.go +++ b/bot/mailbox.go @@ -138,7 +138,7 @@ func (b *Bot) handleBooleanConfigurationKey( return } - b.setBooleanConfigurationKey(ctx, evt, command[1], configKey, getter, setter) + b.setBooleanConfigurationKey(ctx, evt, configKey, command[1], getter, setter) } func (b *Bot) getBooleanConfigurationKey( @@ -170,8 +170,8 @@ func (b *Bot) getBooleanConfigurationKey( func (b *Bot) setBooleanConfigurationKey( ctx context.Context, evt *event.Event, - value string, configKey string, + value string, getter func(entity settings) bool, setter func(entity *settings, value bool) error, ) {