jnl

package
v0.0.0-...-de7bce0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InfoLogger  *log.Logger
	ErrorLogger *log.Logger
)
View Source
var (
	JNL_DIR_NAME = ".jnl"
	JNL_DIR      string
	INFO_DIR     = "info"
)
View Source
var (
	CSV_DATE_FORMAT = "2006-01-02 15:04:05"
)

Functions

func CleanWhileTesting

func CleanWhileTesting() error

func DoInitialize

func DoInitialize() error

func InfoInCSV

func InfoInCSV(cInfos []*CommandInfo, f *os.File) error

func InfoInTable

func InfoInTable(cInfos []*CommandInfo, f *os.File) error

func IsInitialized

func IsInitialized() (bool, error)

func OutErrRoutine

func OutErrRoutine(wg *sync.WaitGroup, reader io.ReadCloser, w io.Writer)

func SaveState

func SaveState(ex *Execution) error

Types

type CommandInfo

type CommandInfo struct {
	Command  []string  `json:"command"`
	Start    time.Time `json:"start"`
	End      time.Time `json:"end,omitempty"`
	ExitCode int       `json:"exitCode,omitempty"`
	Dir      string    `json:"dir,omitempty"`
}

func EveryExecution

func EveryExecution() ([]*CommandInfo, error)

type Execution

type Execution struct {
	Info *CommandInfo
	// contains filtered or unexported fields
}

func NewExecution

func NewExecution(ctx context.Context, command []string) *Execution

func (*Execution) Start

func (e *Execution) Start() error

func (*Execution) Wait

func (e *Execution) Wait() error

Jump to

Keyboard shortcuts

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