command

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(tag, shell, cmd string) (string, string, error)

封装shell执行命令方法,提供友好的输出

func RunByBash

func RunByBash(tag, cmd string) (string, string, error)

通过/bin/bash shell执行命令

func RunBySh

func RunBySh(tag, cmd string) (string, string, error)

通过/bin/sh shell执行命令

func RunCmdStream

func RunCmdStream(tag, shell, cmd string, stdoutChan, stderrChan, shutdownChan chan string) error

异步执行命令, 实时获取命令输出

Types

This section is empty.

Jump to

Keyboard shortcuts

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