Skip to content

Commit

Permalink
Optimize funcs directory;
Browse files Browse the repository at this point in the history
  • Loading branch information
ZYallers committed Mar 23, 2022
1 parent 5a655e2 commit 1c7178f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions funcs/system.go → funcs/execs/shell.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package funcs
package execs

import (
"bytes"
"os/exec"
)

// 阻塞式的执行外部shell命令的函数, 等待执行完毕并返回标准输出
func ExecShell(name string, arg ...string) ([]byte, error) {
func Shell(name string, arg ...string) ([]byte, error) {
// 函数返回一个*Cmd,用于使用给出的参数执行name指定的程序
cmd := exec.Command(name, arg...)

Expand Down
2 changes: 1 addition & 1 deletion funcs/ip.go → funcs/nets/ip.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package funcs
package nets

import (
"encoding/json"
Expand Down

0 comments on commit 1c7178f

Please sign in to comment.