Skip to content

Commit f64ce68

Browse files
authored
Merge pull request #338 from dvrkps/master
Clean go vet error and ineffassign warnings.
2 parents 2d42ff7 + 3a023a5 commit f64ce68

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func ExampleGet() {
9595
// Crimson
9696
}
9797

98-
func ExampleMapKey() {
98+
func ExampleMyKey() {
9999
hello := MyKey("hello")
100100
output, _ := Marshal(map[*MyKey]string{&hello: "world"})
101101
fmt.Println(string(output))

iter_float.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,12 @@ func (iter *Iterator) ReadFloat32() (ret float32) {
7777
}
7878

7979
func (iter *Iterator) readPositiveFloat32() (ret float32) {
80-
value := uint64(0)
81-
c := byte(' ')
8280
i := iter.head
8381
// first char
8482
if i == iter.tail {
8583
return iter.readFloat32SlowPath()
8684
}
87-
c = iter.buf[i]
85+
c := iter.buf[i]
8886
i++
8987
ind := floatDigits[c]
9088
switch ind {
@@ -107,7 +105,7 @@ func (iter *Iterator) readPositiveFloat32() (ret float32) {
107105
return
108106
}
109107
}
110-
value = uint64(ind)
108+
value := uint64(ind)
111109
// chars before dot
112110
non_decimal_loop:
113111
for ; i < iter.tail; i++ {
@@ -216,14 +214,12 @@ func (iter *Iterator) ReadFloat64() (ret float64) {
216214
}
217215

218216
func (iter *Iterator) readPositiveFloat64() (ret float64) {
219-
value := uint64(0)
220-
c := byte(' ')
221217
i := iter.head
222218
// first char
223219
if i == iter.tail {
224220
return iter.readFloat64SlowPath()
225221
}
226-
c = iter.buf[i]
222+
c := iter.buf[i]
227223
i++
228224
ind := floatDigits[c]
229225
switch ind {
@@ -246,7 +242,7 @@ func (iter *Iterator) readPositiveFloat64() (ret float64) {
246242
return
247243
}
248244
}
249-
value = uint64(ind)
245+
value := uint64(ind)
250246
// chars before dot
251247
non_decimal_loop:
252248
for ; i < iter.tail; i++ {

0 commit comments

Comments
 (0)