woodpecker/router/middleware/stream.go

15 lines
228 B
Go
Raw Normal View History

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