woodpecker/router/middleware/queue.go

15 lines
222 B
Go
Raw Normal View History

2016-04-20 01:37:53 +00:00
package middleware
import (
"github.com/drone/drone/queue"
"github.com/gin-gonic/gin"
)
func Queue() gin.HandlerFunc {
queue_ := queue.New()
return func(c *gin.Context) {
queue.ToContext(c, queue_)
c.Next()
}
}