From 92fb9efce9d9f84e06f574243218e3c6d7478d18 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 11 Mar 2014 13:50:02 -0400 Subject: 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. --- combobox.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'combobox.go') 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)) } -- cgit v1.2.3