app

package
v0.1.72 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Arch

func Arch() string

func Args added in v0.1.25

func Args() (args []string)

func Dir

func Dir() string

func Executable

func Executable() string

func GoGroup added in v0.1.56

func GoGroup(n int, fn func())

func LoadConf

func LoadConf[Conf any](filename string) Conf

func Name

func Name() string

func OS

func OS() string

func ParseCmdLine

func ParseCmdLine(version string) (confFile string, ok bool)

func Pid

func Pid() int

func Run

func Run[UserConf any](version string, fn func(UserConf))

func RunJust added in v0.1.24

func RunJust(version string, opts ulog.Options, fn func())

func WaitInterrupt added in v0.1.51

func WaitInterrupt()

Types

type Conf

type Conf struct {
	LogLevel   string
	LogDir     string
	LogFile    string
	LogConsole bool
	LogGoID    bool
}

func (*Conf) Log

func (o *Conf) Log() ulog.Options

type GoDo added in v0.1.49

type GoDo interface {
	Do() bool
	Stop()
	Cancel()
	Sleep(timeout time.Duration)
}

func Go

func Go(fn func()) GoDo

Jump to

Keyboard shortcuts

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