使用currentDir

This commit is contained in:
李宇翔
2020-03-05 18:06:52 +08:00
parent 546d271035
commit 76151b3f6b
3 changed files with 26 additions and 3 deletions

View File

@@ -8,7 +8,6 @@ import (
"net/http"
"os"
"path/filepath"
"runtime"
"time"
. "github.com/Monibuca/engine"
@@ -24,12 +23,11 @@ var config = struct {
}{2048, "ts", true}
func init() {
_, currentFilePath, _, _ := runtime.Caller(0)
InstallPlugin(&PluginConfig{
Name: "TS",
Type: PLUGIN_PUBLISHER,
Version: "1.0.1",
UI: filepath.Join(filepath.Dir(currentFilePath), "dashboard", "ui", "plugin-ts.min.js"),
UI: util.CurrentDir("dashboard", "ui", "plugin-ts.min.js"),
Config: &config,
Run: func() {
if config.AutoPublish {