More go fmt.
This commit is contained in:
parent
a9a07c5cc8
commit
66f9f13ca2
|
@ -48,8 +48,8 @@ func (c *clickCounter) click(button uint, x int, y int, time uintptr, maxTime ui
|
||||||
// now we need to update the internal structures for the next test
|
// now we need to update the internal structures for the next test
|
||||||
c.curButton = button
|
c.curButton = button
|
||||||
c.prevTime = time
|
c.prevTime = time
|
||||||
c.rect = image.Rect(x - xdist, y - ydist,
|
c.rect = image.Rect(x-xdist, y-ydist,
|
||||||
x + xdist, y + ydist)
|
x+xdist, y+ydist)
|
||||||
|
|
||||||
return c.count
|
return c.count
|
||||||
}
|
}
|
||||||
|
|
2
grid.go
2
grid.go
|
@ -34,7 +34,7 @@ type Grid struct {
|
||||||
// control10, control11, control12,
|
// control10, control11, control12,
|
||||||
// control20, control21, control22)
|
// control20, control21, control22)
|
||||||
func NewGrid(nPerRow int, controls ...Control) *Grid {
|
func NewGrid(nPerRow int, controls ...Control) *Grid {
|
||||||
if len(controls) % nPerRow != 0 {
|
if len(controls)%nPerRow != 0 {
|
||||||
panic(fmt.Errorf("incomplete grid given to NewGrid() (not enough controls to evenly divide %d controls into rows of %d controls each)", len(controls), nPerRow))
|
panic(fmt.Errorf("incomplete grid given to NewGrid() (not enough controls to evenly divide %d controls into rows of %d controls each)", len(controls), nPerRow))
|
||||||
}
|
}
|
||||||
nRows := len(controls) / nPerRow
|
nRows := len(controls) / nPerRow
|
||||||
|
|
Loading…
Reference in New Issue