summaryrefslogtreecommitdiff
path: root/pkg/queue/queue.go
diff options
context:
space:
mode:
authorIbrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>2018-12-05 02:19:41 +0300
committerGitHub <noreply@github.com>2018-12-05 02:19:41 +0300
commit5c481dfe96fc40b8b7ad4fdc63fa0968e6832939 (patch)
tree6442b45aeac0e88e83656e871c0e0872d59e4044 /pkg/queue/queue.go
parentDevelop (#20) (diff)
downloadgitbatch-5c481dfe96fc40b8b7ad4fdc63fa0968e6832939.tar.gz
Develop (#23)
* restyle on repository selection * restyle continued on selections * added initial logging to git package * reverse scrolling on commits implemented * queue converted to first in first out principle * added sorting * select all feature added * code reuse improved and added scrolling to controls view * update readme
Diffstat (limited to 'pkg/queue/queue.go')
-rw-r--r--pkg/queue/queue.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/queue/queue.go b/pkg/queue/queue.go
index b61d43b..871a380 100644
--- a/pkg/queue/queue.go
+++ b/pkg/queue/queue.go
@@ -88,7 +88,9 @@ func (jobQueue *JobQueue) AddJob(j *Job) error {
return errors.New("Same job already is in the queue")
}
}
- jobQueue.series = append(jobQueue.series, j)
+ jobQueue.series = append(jobQueue.series, nil)
+ copy(jobQueue.series[1:], jobQueue.series[0:])
+ jobQueue.series[0] = j
return nil
}