1 Star 0 Fork 0

坐公交也用券 / gcs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
sudoBase.go 848 Bytes
一键复制 编辑 原始数据 按行查看 历史
坐公交也用券 提交于 2023-02-08 11:25 . 整合命令到一个实例
package gcs
import (
"strings"
"gitee.com/liumou_site/gbm"
)
func (api *ApiSudo) Grep(match string) *ApiSudo {
api.gfs.Text = api.Strings
api.gfs.Grep(match)
api.Strings = api.gfs.Text
api.Err = api.gfs.Err
r := strings.Split(api.Strings, "\n")
api.Slice = gbm.SliceRemoveNull(r)
api.Err = api.gfs.Err
return api
}
// Echo 打印命令执行反馈信息
//func (api *ApiSudo) Echo() {
// fmt.Println(api.Strings)
//}
//// Line 截取指定行
//func (api *ApiSudo) Line(n int) *ApiSudo {
// api.gfs.Text = api.Strings
// api.gfs.Line(n)
// api.Strings = api.gfs.Text
// api.Err = api.gfs.Err
// return api
//}
//
//// Column 截取指定列
//func (api *ApiSudo) Column(col int, sep string) *ApiSudo {
// api.gfs.Text = api.Strings
// api.gfs.Column(col, sep)
// api.Strings = api.gfs.Text
// api.Err = api.gfs.Err
// return api
//}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/liumou_site/gcs.git
git@gitee.com:liumou_site/gcs.git
liumou_site
gcs
gcs
v1.7.7

搜索帮助

344bd9b3 5694891 D2dac590 5694891