Skip to content

Commit 9c5c459

Browse files
committed
Cleanup: use nil for empty slice
1 parent b3ca944 commit 9c5c459

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/gui/context/base_context.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ func (self *BaseContext) AddMouseKeybindingsFn(fn types.MouseKeybindingsFn) {
136136
}
137137

138138
func (self *BaseContext) ClearAllBindingsFn() {
139-
self.keybindingsFns = []types.KeybindingsFn{}
140-
self.mouseKeybindingsFns = []types.MouseKeybindingsFn{}
139+
self.keybindingsFns = nil
140+
self.mouseKeybindingsFns = nil
141141
}
142142

143143
func (self *BaseContext) AddOnClickFn(fn func() error) {

0 commit comments

Comments
 (0)