enhance

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(format string, a ...interface{})

func Info

func Info(format string, a ...interface{})

func Run

func Run(arg, dir string, in ...*bytes.Buffer) (string, error)

Run provides the execution of shell scripts in golang, which can support macOS, Windows, and Linux operating systems. Other operating systems are currently not supported

func Warning

func Warning(format string, a ...interface{})

Types

type Console

type Console interface {
	Success(format string, a ...interface{})
	Info(format string, a ...interface{})
	Debug(format string, a ...interface{})
	Warning(format string, a ...interface{})
	Error(format string, a ...interface{})
	Fatalln(format string, a ...interface{})
	MarkDone()
	Must(err error)
}

Console 包装fmt.Sprintf,默认情况下, 它实现了colorConsole提供彩色输出到控制台,和ideaConsole输出;

func NewColorConsole

func NewColorConsole(enable ...bool) Console

NewColorConsole 返回一个colorConsole实例;

func NewConsole

func NewConsole(idea bool) Console

NewConsole 返回一个Console实例;

func NewIdeaConsole

func NewIdeaConsole() Console

NewIdeaConsole returns a instance of ideaConsole

type RunFunc

type RunFunc func(string, string, ...*bytes.Buffer) (string, error)

RunFunc defines a function type of Run function

Jump to

Keyboard shortcuts

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