mirror of
https://github.com/fatedier/frp.git
synced 2025-07-20 12:50:04 +07:00
Let's get rid of ugly statik (#2255)
* Get rid of ugly statik go1.16 introduced the embed package, it's the more graceful solution for embedding file into binary. https://golang.org/pkg/embed/ * remove statik totally * split go and static files in assets
This commit is contained in:
@ -280,11 +280,7 @@ func NewService(cfg config.ServerCommonConf) (svr *Service, err error) {
|
||||
// Create dashboard web server.
|
||||
if cfg.DashboardPort > 0 {
|
||||
// Init dashboard assets
|
||||
err = assets.Load(cfg.AssetsDir)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Load assets error: %v", err)
|
||||
return
|
||||
}
|
||||
assets.Load(cfg.AssetsDir)
|
||||
|
||||
address := net.JoinHostPort(cfg.DashboardAddr, strconv.Itoa(cfg.DashboardPort))
|
||||
err = svr.RunDashboardServer(address)
|
||||
|
Reference in New Issue
Block a user