Documentation
¶
Index ¶
- func CatchTerminate(f func()) (status bool)
- func Command(ctx context.Context, log logger.MessageInterface, prog string, args ...string) string
- func CommandWithErr(ctx context.Context, options CommandOptions, prog string, args ...string) (err error)
- func CommandWithOptions(ctx context.Context, options CommandOptions, prog string, args ...string) string
- func ConvertMap[FromType, ToType any](objects []FromType, converter func(f FromType) ToType) []ToType
- func FileExists(pathname string) bool
- func IsDir(dir string) bool
- func MaybeTerminate(ctx context.Context)
- func ParseInt(s string) int64
- func RandSeq(n int) string
- func ReadDir(pathname string) []fs.DirEntry
- func Retry(fun func(), tries int)
- func SetSysProcAttribute(cmd *exec.Cmd)
- func ToString[T any](some T) string
- type CommandOptions
- type PanicError
- type Terminated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CatchTerminate ¶
func CatchTerminate(f func()) (status bool)
func CommandWithErr ¶
func CommandWithOptions ¶
func ConvertMap ¶
func ConvertMap[FromType, ToType any](objects []FromType, converter func(f FromType) ToType) []ToType
func FileExists ¶
func MaybeTerminate ¶
func SetSysProcAttribute ¶
Types ¶
type CommandOptions ¶
type CommandOptions struct {
ExitCodes []int
Log logger.MessageInterface
}
type PanicError ¶
func PanicToError ¶
func PanicToError(fun func()) (err PanicError)
type Terminated ¶
type Terminated struct{}
Terminated terminated
func (Terminated) Error ¶
func (err Terminated) Error() string
Click to show internal directories.
Click to hide internal directories.