config

package
v0.0.0-...-96e7113 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CfgDir = filepath.Join(HomeDir, "config")
View Source
var Configs []Config
View Source
var ErrFile *os.File
View Source
var ErrPath = filepath.Join(LogDir, "err.log")
View Source
var HomeDir = filepath.Join(HomePath(), "pm")
View Source
var LogDir = filepath.Join(HomeDir, "log")
View Source
var OutFile *os.File
View Source
var OutPath = filepath.Join(LogDir, "out.log")
View Source
var VarDir = filepath.Join(HomeDir, "var")

Functions

func GetErrPath

func GetErrPath(cfg Config) (string, error)

func GetOutPath

func GetOutPath(cfg Config) (string, error)

func HomePath

func HomePath() string

Types

type CmdInfo

type CmdInfo struct {
	OutFile     *os.File
	ErrFile     *os.File
	SysProcAttr *syscall.SysProcAttr
	Dir         string

	OutPath string
	ErrPath string
}

func NewCmdInfo

func NewCmdInfo(cfg Config) (*CmdInfo, error)

type Config

type Config struct {
	Name    string   `json:"name"`
	User    string   `json:"user"`
	Dir     string   `json:"dir"`
	Command []string `json:"command"`
	Restart bool     `json:"restart"`
	Out     string   `json:"out"`
	Err     string   `json:"err"`
}

func InitConfig

func InitConfig() []Config

Jump to

Keyboard shortcuts

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