mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 03:01:42 +00:00
linting: add to Makefile & do some fixes
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
// nolint: goimports
|
||||
package autofile
|
||||
|
||||
import (
|
||||
. "github.com/tendermint/tmlibs/common"
|
||||
"os"
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
. "github.com/tendermint/tmlibs/common"
|
||||
)
|
||||
|
||||
func TestSIGHUP(t *testing.T) {
|
||||
|
@ -107,7 +107,6 @@ func (g *Group) OnStart() error {
|
||||
func (g *Group) OnStop() {
|
||||
g.BaseService.OnStop()
|
||||
g.ticker.Stop()
|
||||
return
|
||||
}
|
||||
|
||||
func (g *Group) SetHeadSizeLimit(limit int64) {
|
||||
@ -568,8 +567,7 @@ func (gr *GroupReader) ReadLine() (string, error) {
|
||||
bytesRead, err := gr.curReader.ReadBytes('\n')
|
||||
if err == io.EOF {
|
||||
// Open the next file
|
||||
err := gr.openFile(gr.curIndex + 1)
|
||||
if err != nil {
|
||||
if err := gr.openFile(gr.curIndex + 1); err != nil {
|
||||
return "", err
|
||||
}
|
||||
if len(bytesRead) > 0 && bytesRead[len(bytesRead)-1] == byte('\n') {
|
||||
|
@ -100,8 +100,7 @@ func TestCheckHeadSizeLimit(t *testing.T) {
|
||||
|
||||
// Write 1000 bytes 999 times.
|
||||
for i := 0; i < 999; i++ {
|
||||
err := g.WriteLine(RandStr(999))
|
||||
if err != nil {
|
||||
if err := g.WriteLine(RandStr(999)); err != nil {
|
||||
t.Fatal("Error appending to head", err)
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ func initSighupWatcher() {
|
||||
signal.Notify(c, syscall.SIGHUP)
|
||||
|
||||
go func() {
|
||||
for _ = range c {
|
||||
for range c {
|
||||
sighupWatchers.closeAll()
|
||||
atomic.AddInt32(&sighupCounter, 1)
|
||||
}
|
||||
|
Reference in New Issue
Block a user