From 1e66637cd206066bced74b637e62283d9b367004 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 10 Jun 2014 14:59:39 -0400 Subject: More go fmt. --- combobox.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'combobox.go') diff --git a/combobox.go b/combobox.go index 02040cb..83b58b7 100644 --- a/combobox.go +++ b/combobox.go @@ -9,16 +9,16 @@ import ( // A Combobox is a drop-down list of items, of which at most one can be selected at any given time. You may optionally make the combobox editable to allow custom items. Initially, no item will be selected (and no text entered in an editable Combobox's entry field). What happens to the text shown in a Combobox if its width is too small is implementation-defined. type Combobox struct { - lock sync.Mutex - created bool - sysData *sysData - initItems []string + lock sync.Mutex + created bool + sysData *sysData + initItems []string } func newCombobox(editable bool, items ...string) (c *Combobox) { c = &Combobox{ - sysData: mksysdata(c_combobox), - initItems: items, + sysData: mksysdata(c_combobox), + initItems: items, } c.sysData.alternate = editable return c @@ -67,7 +67,7 @@ func (c *Combobox) InsertBefore(what string, before int) { if before < 0 || before >= len(c.initItems) { goto badrange } - m = make([]string, 0, len(c.initItems) + 1) + m = make([]string, 0, len(c.initItems)+1) m = append(m, c.initItems[:before]...) m = append(m, what) c.initItems = append(m, c.initItems[before:]...) @@ -91,7 +91,7 @@ func (c *Combobox) Delete(index int) { if index < 0 || index >= len(c.initItems) { goto badrange } - c.initItems = append(c.initItems[:index], c.initItems[index + 1:]...) + c.initItems = append(c.initItems[:index], c.initItems[index+1:]...) return badrange: panic(fmt.Errorf("index %d out of range in Combobox.Delete()", index)) @@ -149,11 +149,11 @@ func (c *Combobox) make(window *sysData) (err error) { func (c *Combobox) setRect(x int, y int, width int, height int, rr *[]resizerequest) { *rr = append(*rr, resizerequest{ - sysData: c.sysData, - x: x, - y: y, - width: width, - height: height, + sysData: c.sysData, + x: x, + y: y, + width: width, + height: height, }) } -- cgit v1.2.3