summaryrefslogtreecommitdiff
path: root/combobox.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-03-11 13:50:02 -0400
committerPietro Gagliardi <[email protected]>2014-03-11 13:50:02 -0400
commit92fb9efce9d9f84e06f574243218e3c6d7478d18 (patch)
tree8dab00a7dd655e9dd04008da50e6eb38bbdd939d /combobox.go
parentc43583fe20a3a54920774fb762c74d22b60b70dc (diff)
Removed error returns from Combobox.Delete(), Listbox.Delete(), and sysData.delete(), since they are no longer used. Updated the TODO file to mark this issue closed.
Diffstat (limited to 'combobox.go')
-rw-r--r--combobox.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/combobox.go b/combobox.go
index 85384be..009e639 100644
--- a/combobox.go
+++ b/combobox.go
@@ -78,7 +78,7 @@ badrange:
}
// Delete removes the given item from the Combobox. It panics if the given index is out of bounds.
-func (c *Combobox) Delete(index int) error {
+func (c *Combobox) Delete(index int) {
c.lock.Lock()
defer c.lock.Unlock()
@@ -86,13 +86,14 @@ func (c *Combobox) Delete(index int) error {
if index < 0 || index >= c.sysData.len() {
goto badrange
}
- return c.sysData.delete(index)
+ c.sysData.delete(index)
+ return
}
if index < 0 || index >= len(c.initItems) {
goto badrange
}
c.initItems = append(c.initItems[:index], c.initItems[index + 1:]...)
- return nil
+ return
badrange:
panic(fmt.Errorf("index %d out of range in Combobox.Delete()", index))
}