Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ gex Public

Golang exec extension library,Golang外部程序执行扩展库,提供更友好的操作API以及各种功能扩展,方便使用者更好的操作外部程序

License

Notifications You must be signed in to change notification settings

goexl/gex

Repository files navigation

Gex

Sourcegraph GoDoc Go Report Card Build Status Codecov License

Golang exec extension library,Golang外部命令执行扩展库,有如下功能

  • 非常容易使用
  • 一切皆可配置
  • 可变参数
  • 运行时目录
  • 环境变量
  • 管道
  • 检查器
    • 字符串包含Contains
    • 字符串全包含ContainsAll
    • 字符串任何包含ContainsAny
    • 字符串相等Equal
    • 路径模式匹配PathMatch
    • 正则匹配Regexp
  • 通知器
    • 应用内方法通知Func
    • 其它通知器,通过额外代码库实现,不增加Gex的复杂度
  • 收集器
    • 字符串String
    • 文件File
    • 文件名Filename
    • 写入者Writer
  • 自动解决乱码

快速开始

Gex使用非常简单

package main
import (
 `github.com/goexl/gex`
)
func main() {
 _, _ = gex.Exec(`ping`, gex.Args(`www.163.com`, `-c`, 10))
}

or

package main
import (
 `github.com/goexl/gex`
)
func main() {
 _, _ = gex.Exec(`ping`, gex.Cli(`www.163.com -c 10`))
}

Gex有非常多的配置项,请参看使用文档

文档

点击这里查看最新文档

使用示例

点击这里查看最新的代码示例

交流

捐助

支持宝 微信

About

Golang exec extension library,Golang外部程序执行扩展库,提供更友好的操作API以及各种功能扩展,方便使用者更好的操作外部程序

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /