Skip to content

Commit 5bfceac

Browse files
committed
Merge pull request skip2#2 from shawnps/gofmt
gofmt -s
2 parents a4b2f11 + d6fbce3 commit 5bfceac

File tree

5 files changed

+13
-14
lines changed

5 files changed

+13
-14
lines changed

bitset/bitset_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import (
1010

1111
func TestNewBitset(t *testing.T) {
1212
tests := [][]bool{
13-
[]bool{},
14-
[]bool{b1},
15-
[]bool{b0},
16-
[]bool{b1, b0},
17-
[]bool{b1, b0, b1},
18-
[]bool{b0, b0, b1},
13+
{},
14+
{b1},
15+
{b0},
16+
{b1, b0},
17+
{b1, b0, b1},
18+
{b0, b0, b1},
1919
}
2020

2121
for _, v := range tests {

qrcode.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ type QRCode struct {
101101

102102
data *bitset.Bitset
103103
symbol *symbol
104-
mask int
104+
mask int
105105
}
106106

107107
// New constructs a QRCode.

qrcode_decode_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func TestDecodeFuzz(t *testing.T) {
154154
for j := 0; j < len; j++ {
155155
// zbarimg seems to have trouble with special characters, test printable
156156
// characters only for now.
157-
content += string(32+r.Intn(94))
157+
content += string(32 + r.Intn(94))
158158
}
159159

160160
for _, level := range []RecoveryLevel{Low, Medium, High, Highest} {
@@ -230,4 +230,3 @@ func BenchmarkDecodeTest(b *testing.B) {
230230
}
231231
}
232232
}
233-

qrcode_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func TestQRCodeMaxCapacity(t *testing.T) {
1414
}
1515

1616
tests := []struct {
17-
string string
17+
string string
1818
numRepetitions int
1919
}{
2020
{
@@ -155,7 +155,7 @@ func TestQRCodeISOAnnexIExample(t *testing.T) {
155155

156156
if q.mask != 2 {
157157
t.Errorf("ISO Annex I example mask got %d, expected %d\n", q.mask,
158-
expectedMask)
158+
expectedMask)
159159
}
160160
}
161161

symbol.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (m *symbol) numEmptyModules() int {
8181
var count int
8282
for y := 0; y < m.symbolSize; y++ {
8383
for x := 0; x < m.symbolSize; x++ {
84-
if !m.isUsed[y + m.quietZoneSize][x + m.quietZoneSize] {
84+
if !m.isUsed[y+m.quietZoneSize][x+m.quietZoneSize] {
8585
count++
8686
}
8787
}
@@ -252,7 +252,7 @@ func (m *symbol) penalty3() int {
252252
penalty += penaltyWeight3
253253
bitBuffer = 0xFF
254254
default:
255-
if x == m.symbolSize - 1 && (bitBuffer & 0x7f) == 0x5d {
255+
if x == m.symbolSize-1 && (bitBuffer&0x7f) == 0x5d {
256256
penalty += penaltyWeight3
257257
bitBuffer = 0xFF
258258
}
@@ -276,7 +276,7 @@ func (m *symbol) penalty3() int {
276276
penalty += penaltyWeight3
277277
bitBuffer = 0xFF
278278
default:
279-
if y == m.symbolSize - 1 && (bitBuffer & 0x7f) == 0x5d {
279+
if y == m.symbolSize-1 && (bitBuffer&0x7f) == 0x5d {
280280
penalty += penaltyWeight3
281281
bitBuffer = 0xFF
282282
}

0 commit comments

Comments
 (0)