MCPcopy Create free account
hub / github.com/LanceLRQ/deer-executor / ParseGeneratorScript

Function ParseGeneratorScript

common/utils/binary.go:58–64  ·  view source on GitHub ↗

ParseGeneratorScript 解析generator脚本

(script string)

Source from the content-addressed store, hash-verified

56
57// ParseGeneratorScript 解析generator脚本
58func ParseGeneratorScript(script string) (string, []string, error) {
59 vals := strings.Split(script, " ")
60 if len(vals) <= 1 {
61 return "", nil, errors.Errorf("generator calling script error")
62 }
63 return vals[0], vals[1:], nil
64}
65
66// RunUnixShell 运行UnixShell,支持context
67func RunUnixShell(options *structs.ShellOptions) (*structs.ShellResult, error) {

Callers 1

CallGeneratorFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected