mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-12 08:23:48 +02:00
15 lines
210 B
Go
15 lines
210 B
Go
package middleware
|
|
|
|
import (
|
|
"github.com/drone/drone/bus"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func Bus() gin.HandlerFunc {
|
|
bus_ := bus.New()
|
|
return func(c *gin.Context) {
|
|
bus.ToContext(c, bus_)
|
|
c.Next()
|
|
}
|
|
}
|