diff --git a/funcs/system.go b/funcs/execs/shell.go similarity index 89% rename from funcs/system.go rename to funcs/execs/shell.go index 91072f2..ede7c47 100644 --- a/funcs/system.go +++ b/funcs/execs/shell.go @@ -1,4 +1,4 @@ -package funcs +package execs import ( "bytes" @@ -6,7 +6,7 @@ import ( ) // 阻塞式的执行外部shell命令的函数, 等待执行完毕并返回标准输出 -func ExecShell(name string, arg ...string) ([]byte, error) { +func Shell(name string, arg ...string) ([]byte, error) { // 函数返回一个*Cmd,用于使用给出的参数执行name指定的程序 cmd := exec.Command(name, arg...) diff --git a/funcs/ip.go b/funcs/nets/ip.go similarity index 98% rename from funcs/ip.go rename to funcs/nets/ip.go index ffda741..4d59c5c 100644 --- a/funcs/ip.go +++ b/funcs/nets/ip.go @@ -1,4 +1,4 @@ -package funcs +package nets import ( "encoding/json"