[add] remove system
This commit is contained in:
parent
4cd14e58ef
commit
c3e74b7964
5 changed files with 1 additions and 48 deletions
2
Makefile
2
Makefile
|
|
@ -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/...)
|
||||
|
|
|
|||
1
main.go
1
main.go
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
// }
|
||||
|
|
@ -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)
|
||||
// }
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
package system
|
||||
|
||||
// Exec call system command
|
||||
// func Exec(cmd string, args ...string) {}
|
||||
Loading…
Add table
Reference in a new issue