diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-26 15:02:32 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-27 18:16:16 +1100 |
commit | 98e7ec090509f089a3196848c324fdce2fb462fc (patch) | |
tree | cda5fcc6bf2ee5f442dff68fde121ef9ff3754b9 /pkg/gui/services | |
parent | 7128d822cb82beba890aad4dd39e51270598cf0b (diff) |
add type alias for Key
Diffstat (limited to 'pkg/gui/services')
-rw-r--r-- | pkg/gui/services/custom_commands/client.go | 2 | ||||
-rw-r--r-- | pkg/gui/services/custom_commands/keybinding_creator.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/services/custom_commands/client.go b/pkg/gui/services/custom_commands/client.go index fc36405c1..3dead7d73 100644 --- a/pkg/gui/services/custom_commands/client.go +++ b/pkg/gui/services/custom_commands/client.go @@ -23,7 +23,7 @@ func NewClient( git *commands.GitCommand, contexts *context.ContextTree, helpers *helpers.Helpers, - getKey func(string) interface{}, + getKey func(string) types.Key, ) *Client { sessionStateLoader := NewSessionStateLoader(contexts, helpers) handlerCreator := NewHandlerCreator(c, os, git, sessionStateLoader) diff --git a/pkg/gui/services/custom_commands/keybinding_creator.go b/pkg/gui/services/custom_commands/keybinding_creator.go index ed2921359..1d1edb53e 100644 --- a/pkg/gui/services/custom_commands/keybinding_creator.go +++ b/pkg/gui/services/custom_commands/keybinding_creator.go @@ -14,10 +14,10 @@ import ( // KeybindingCreator takes a custom command along with its handler and returns a corresponding keybinding type KeybindingCreator struct { contexts *context.ContextTree - getKey func(string) interface{} + getKey func(string) types.Key } -func NewKeybindingCreator(contexts *context.ContextTree, getKey func(string) interface{}) *KeybindingCreator { +func NewKeybindingCreator(contexts *context.ContextTree, getKey func(string) types.Key) *KeybindingCreator { return &KeybindingCreator{ contexts: contexts, getKey: getKey, |