https://github.com/goexl/gex
Golang exec extension library,Golang外部程序执行扩展库,提供更友好的操作API以及各种功能扩展,方便使用者更好的操作外部程序
https://github.com/goexl/gex
call exec framework go golang library
Last synced: 2 months ago
JSON representation
Golang exec extension library,Golang外部程序执行扩展库,提供更友好的操作API以及各种功能扩展,方便使用者更好的操作外部程序
- Host: GitHub
- URL: https://github.com/goexl/gex
- Owner: goexl
- License: apache-2.0
- Created: 2022-01-11T01:49:43.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-28T01:44:08.000Z (about 1 year ago)
- Last Synced: 2025-03-28T02:36:36.853Z (about 1 year ago)
- Topics: call, exec, framework, go, golang, library
- Language: Go
- Homepage: https://gex.storezhang.tech
- Size: 605 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gex
[](https://sourcegraph.com/github.com/goexl/gex?badge)
[](https://pkg.go.dev/github.com/goexl/gex)
[](https://goreportcard.com/report/github.com/goexl/gex)
[](https://github.ruijc.com:20443/goexl/gex)
[](https://codecov.io/gh/goexl/gex)
[](https://raw.githubusercontent.com/goexl/gex/master/LICENSE)
Golang exec extension library,Golang外部命令执行扩展库,有如下功能
- 非常容易使用
- 一切皆可配置
- 可变参数
- 运行时目录
- 环境变量
- 管道
- 检查器
- 字符串包含`Contains`
- 字符串全包含`ContainsAll`
- 字符串任何包含`ContainsAny`
- 字符串相等`Equal`
- 路径模式匹配`PathMatch`
- 正则匹配`Regexp`
- 通知器
- 应用内方法通知`Func`
- 其它通知器,通过额外代码库实现,不增加`Gex`的复杂度
- 收集器
- 字符串`String`
- 文件`File`
- 文件名`Filename`
- 写入者`Writer`
- 自动解决乱码
## 快速开始
`Gex`使用非常简单
```go
package main
import (
`github.com/goexl/gex`
)
func main() {
_, _ = gex.Exec(`ping`, gex.Args(`www.163.com`, `-c`, 10))
}
```
or
```go
package main
import (
`github.com/goexl/gex`
)
func main() {
_, _ = gex.Exec(`ping`, gex.Cli(`www.163.com -c 10`))
}
```
> `Gex`有非常多的配置项,请参看[**使用文档**](https://gex.storezhang.tech)
## 文档
[点击这里查看最新文档](https://gex.storezhang.tech)
## 使用示例
[点击这里查看最新的代码示例](example)
## 交流
## 捐助

