Merge pull request #7295 from mkumatag/fix_gosimple

test: Fix gosimple errors
release-3.2
Gyu-Ho Lee 2017-02-09 07:39:55 -08:00 committed by GitHub
commit 1a4a4fa7ac
5 changed files with 7 additions and 7 deletions

View File

@ -87,7 +87,7 @@ type notifier struct {
func newNotifier() *notifier {
return &notifier{
c: make(chan struct{}, 0),
c: make(chan struct{}),
}
}

View File

@ -112,7 +112,7 @@ func TestElectionFailover(t *testing.T) {
cctx, cancel := context.WithCancel(context.TODO())
defer cancel()
ss := make([]*concurrency.Session, 3, 3)
ss := make([]*concurrency.Session, 3)
for i := 0; i < 3; i++ {
var err error

View File

@ -101,7 +101,7 @@ func NewStore(b backend.Backend, le lease.Lessor, ig ConsistentIndexGetter) *sto
currentRev: revision{main: 1},
compactMainRev: -1,
bytesBuf8: make([]byte, 8, 8),
bytesBuf8: make([]byte, 8),
fifoSched: schedule.NewFIFOScheduler(),
stopc: make(chan struct{}),

View File

@ -453,9 +453,9 @@ func TestReadyContainUpdates(t *testing.T) {
{Ready{}, false},
{Ready{SoftState: &SoftState{Lead: 1}}, true},
{Ready{HardState: raftpb.HardState{Vote: 1}}, true},
{Ready{Entries: make([]raftpb.Entry, 1, 1)}, true},
{Ready{CommittedEntries: make([]raftpb.Entry, 1, 1)}, true},
{Ready{Messages: make([]raftpb.Message, 1, 1)}, true},
{Ready{Entries: make([]raftpb.Entry, 1)}, true},
{Ready{CommittedEntries: make([]raftpb.Entry, 1)}, true},
{Ready{Messages: make([]raftpb.Message, 1)}, true},
{Ready{Snapshot: raftpb.Snapshot{Metadata: raftpb.SnapshotMetadata{Index: 1}}}, true},
}

View File

@ -66,7 +66,7 @@ func doRounds(rcs []roundClient, rounds int) {
var wg sync.WaitGroup
wg.Add(len(rcs))
finished := make(chan struct{}, 0)
finished := make(chan struct{})
for i := range rcs {
go func(rc *roundClient) {
defer wg.Done()