mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-16 01:19:02 +01:00
Use go embed for web files and remove httptreemux (#382)
- replace togo with go embed - replace httptreemux with gin closes #308
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/woodpecker-ci/woodpecker/server"
|
||||
"github.com/woodpecker-ci/woodpecker/server/model"
|
||||
"github.com/woodpecker-ci/woodpecker/server/plugins/environments"
|
||||
@@ -37,7 +38,6 @@ import (
|
||||
"github.com/woodpecker-ci/woodpecker/server/store/datastore"
|
||||
"github.com/woodpecker-ci/woodpecker/server/web"
|
||||
|
||||
"github.com/dimfeld/httptreemux"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
"github.com/sirupsen/logrus"
|
||||
@@ -201,8 +201,8 @@ func setupCoding(c *cli.Context) (remote.Remote, error) {
|
||||
})
|
||||
}
|
||||
|
||||
func setupTree(c *cli.Context) *httptreemux.ContextMux {
|
||||
tree := httptreemux.NewContextMux()
|
||||
func setupTree(c *cli.Context) *gin.Engine {
|
||||
tree := gin.New()
|
||||
web.New(
|
||||
web.WithSync(time.Hour*72),
|
||||
web.WithDocs(c.String("docs")),
|
||||
|
||||
Reference in New Issue
Block a user