gofmt
This commit is contained in:
parent
510897a497
commit
9377cb376d
@ -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)
|
||||
|
8
sched.go
8
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()
|
||||
|
Loading…
Reference in New Issue
Block a user