From 9377cb376d25f79dfd6b8bbf4141da8d17ffdd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 27 Jul 2020 13:21:36 +0200 Subject: [PATCH] gofmt --- request_queue.go | 4 ++-- sched.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/request_queue.go b/request_queue.go index b40375dc8..85d3abf46 100644 --- a/request_queue.go +++ b/request_queue.go @@ -36,8 +36,8 @@ func (q *requestQueue) Remove(i int) *workerRequest { old := *q n := len(old) item := old[i] - old[i] = old[n - 1] - old[n - 1] = nil + old[i] = old[n-1] + old[n-1] = nil item.index = -1 *q = old[0 : n-1] sort.Sort(q) diff --git a/sched.go b/sched.go index b549eb7c9..ed648bf19 100644 --- a/sched.go +++ b/sched.go @@ -124,8 +124,8 @@ type workerRequest struct { index int // The index of the item in the heap. indexHeap int - ret chan<- workerResponse - ctx context.Context + ret chan<- workerResponse + ctx context.Context } type workerResponse struct { @@ -203,7 +203,7 @@ type SchedDiagRequestInfo struct { } type SchedDiagInfo struct { - Requests []SchedDiagRequestInfo + Requests []SchedDiagRequestInfo OpenWindows []WorkerID } @@ -671,7 +671,7 @@ func (sh *scheduler) Info(ctx context.Context) (interface{}, error) { } select { - case res := <- ch: + case res := <-ch: return res, nil case <-ctx.Done(): return nil, ctx.Err()