1 Star 0 Fork 0

坐公交也用券/gcs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
api.go 708 Bytes
一键复制 编辑 原始数据 按行查看 历史
liumou 提交于 2022-12-19 22:46 . 使用子脚本执行命令
package gcs
// ShellConfig 定义命令的结构体
type ShellConfig struct {
printer bool // 打印详细错误信息(默认: true)
prints bool // 是否打印详细信息(默认: false)
debug bool // 是否打印调试信息(默认: false)
password string // sudo权限使用的密码
home string // 当前用户家目录(自动判断)
user string // 当前用户名(自动判断)
uid int // 当前用户uid(自动判断)
isRoot bool // 是否属于root用户(自动判断)
realtime bool // 是否开启实时打印信息
SudoPath string // sudo命令绝对路径
ShellFile string // 生成的Shell脚本
text string // 需要执行的命令
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/liumou_site/gcs.git
git@gitee.com:liumou_site/gcs.git
liumou_site
gcs
gcs
v1.3.3

搜索帮助