ci(backend): 调整 embed server
This commit is contained in:
20
backend/internal/web/embed_off.go
Normal file
20
backend/internal/web/embed_off.go
Normal file
@@ -0,0 +1,20 @@
|
||||
//go:build !embed
|
||||
|
||||
package web
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func ServeEmbeddedFrontend() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
c.String(http.StatusNotFound, "Frontend not embedded. Build with -tags embed to include frontend.")
|
||||
c.Abort()
|
||||
}
|
||||
}
|
||||
|
||||
func HasEmbeddedFrontend() bool {
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user