feat: init js-core

This commit is contained in:
Skyxim
2022-06-04 23:51:13 +08:00
parent 8ff7e180a4
commit 91b4176557
5 changed files with 117 additions and 7 deletions

18
component/js/log.go Normal file
View File

@@ -0,0 +1,18 @@
package js
import "github.com/Dreamacro/clash/log"
type JsLog struct {
}
func (j JsLog) Log(s string) {
log.Infoln("[JS] %s", s)
}
func (j JsLog) Warn(s string) {
log.Warnln("[JS] %s", s)
}
func (j JsLog) Error(s string) {
log.Errorln("[JS] %s", s)
}