[add] remove system

This commit is contained in:
Max 2023-02-02 19:38:22 +08:00
parent 4cd14e58ef
commit c3e74b7964
5 changed files with 1 additions and 48 deletions

View file

@ -9,7 +9,7 @@ COMMIT := $(shell git log | head -n 1 | awk '{print substr($$2, 0, 12)}')
NOW := $(shell date +"%FT%T%z")
# ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
TESTFOLDER := $(shell $(GO) list ./... | grep -E 'api|model|flow|script|fs|i18n|connector|query|plugin|cert' | grep -vE 'examples|tests*|config|widgets')
TESTFOLDER := $(shell $(GO) list ./... | grep -E 'api|model|flow|script|fs|i18n|connector|query|plugin|cert|crypto' | grep -vE 'examples|tests*|config|widgets')
TESTTAGS ?= ""
# TESTWIDGETS := $(shell $(GO) list ./widgets/...)

View file

@ -6,7 +6,6 @@ import (
_ "github.com/yaoapp/gou/encoding"
_ "github.com/yaoapp/yao/crypto"
_ "github.com/yaoapp/yao/helper"
_ "github.com/yaoapp/yao/system"
_ "github.com/yaoapp/yao/utils"
)

View file

@ -1,33 +0,0 @@
package system
// func init() {
// // gou.RegisterProcessHandler("yao.system.Exec", processExec)
// }
// // processExec execute the system command
// func processExec(process *gou.Process) interface{} {
// process.ValidateArgNums(1)
// cmd := process.ArgsString(0)
// _, err := exec.LookPath(cmd)
// if err != nil {
// exception.New("command %s not found: %s", 400, cmd, err.Error()).Throw()
// return nil
// }
// args := []string{}
// for i, arg := range process.Args {
// if i == 0 {
// continue
// }
// args = append(args, fmt.Sprintf("%v", arg))
// }
// res, err := exec.Command(cmd, args...).Output()
// if err != nil {
// exception.New("command %s error: %s", 500, cmd, err.Error()).Throw()
// return nil
// }
// return strings.TrimRight(string(res), "\n")
// }

View file

@ -1,9 +0,0 @@
package system
// func TestProcessReturn(t *testing.T) {
// output, err := process.New("yao.system.Exec", "echo", "hello").Exec()
// if err != nil {
// t.Fatal(err)
// }
// assert.Equal(t, "hello", output)
// }

View file

@ -1,4 +0,0 @@
package system
// Exec call system command
// func Exec(cmd string, args ...string) {}