Browse Source

make linter happy

pull/1842/head
Ethan Buchman 6 years ago
parent
commit
eccdce11c5
5 changed files with 9 additions and 18 deletions
  1. +0
    -1
      libs/autofile/cmd/logjack.go
  2. +1
    -1
      libs/bech32/bech32_test.go
  3. +8
    -10
      libs/common/async.go
  4. +0
    -2
      libs/common/errors_test.go
  5. +0
    -4
      libs/db/debug_db.go

+ 0
- 1
libs/autofile/cmd/logjack.go View File

@ -13,7 +13,6 @@ import (
)
const Version = "0.0.1"
const sleepSeconds = 1 // Every second
const readBufferSize = 1024 // 1KB at a time
// Parse command-line options


+ 1
- 1
libs/bech32/bech32_test.go View File

@ -25,7 +25,7 @@ func TestEncodeAndDecode(t *testing.T) {
if hrp != "shasum" {
t.Error("Invalid hrp")
}
if bytes.Compare(data, sum[:]) != 0 {
if !bytes.Equal(data, sum[:]) {
t.Error("Invalid decode")
}
}

+ 8
- 10
libs/common/async.go View File

@ -76,17 +76,15 @@ func (trs *TaskResultSet) Reap() *TaskResultSet {
func (trs *TaskResultSet) Wait() *TaskResultSet {
for i := 0; i < len(trs.results); i++ {
var trch = trs.chz[i]
select {
case result, ok := <-trch:
if ok {
// Write result.
trs.results[i] = taskResultOK{
TaskResult: result,
OK: true,
}
} else {
// We already wrote it.
result, ok := <-trch
if ok {
// Write result.
trs.results[i] = taskResultOK{
TaskResult: result,
OK: true,
}
} else {
// We already wrote it.
}
}
return trs


+ 0
- 2
libs/common/errors_test.go View File

@ -17,10 +17,8 @@ func TestErrorPanic(t *testing.T) {
if r := recover(); r != nil {
err = ErrorWrap(r, "This is the message in ErrorWrap(r, message).")
}
return
}()
panic(pnk{"something"})
return nil
}
var err = capturePanic()


+ 0
- 4
libs/db/debug_db.go View File

@ -7,10 +7,6 @@ import (
cmn "github.com/tendermint/tendermint/libs/common"
)
func _fmt(f string, az ...interface{}) string {
return fmt.Sprintf(f, az...)
}
//----------------------------------------
// debugDB


Loading…
Cancel
Save