gex

package module
v0.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2025 License: Apache-2.0 Imports: 1 Imported by: 2

README

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有非常多的配置项,请参看使用文档

文档

点击这里查看最新文档

使用示例

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

交流

捐助

支持宝 微信

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.2.8

func New(command string) *builder.Command

New 合建命令

Types

type Command added in v0.3.7

type Command = builder.Command

Command 命令

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL