Documentation ¶
Index ¶
- func CatchTerminate(f func()) (status bool)
- func Command(ctx context.Context, 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 MaybeTerminate(ctx context.Context)
- func PanicToErrorAndLog(fun func(), log func(string, ...interface{})) (err error)
- func ParseInt(s string) int64
- func RandInt64() int64
- func RandSeq(n int) string
- func Retry(fun func(), tries int)
- func SetSysProcAttribute(cmd *exec.Cmd)
- type CommandOptions
- type Delayed
- type DelayedFunc
- type NameIDInterface
- type NameIDMap
- 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 PanicToErrorAndLog ¶
func SetSysProcAttribute ¶
Types ¶
type CommandOptions ¶
type CommandOptions struct {
ExitCodes []int
}
type Delayed ¶
type Delayed struct {
// contains filtered or unexported fields
}
func NewDelayed ¶
func NewDelayed() Delayed
func (*Delayed) Append ¶
func (o *Delayed) Append(fun DelayedFunc)
type DelayedFunc ¶
type DelayedFunc func()
type NameIDInterface ¶
type NameIDMap ¶
type NameIDMap struct {
// contains filtered or unexported fields
}
func NewNameIDMap ¶
func NewNameIDMap[T NameIDInterface](beans []T) NameIDMap
type Terminated ¶
type Terminated struct{}
Terminated terminated
func (Terminated) Error ¶
func (err Terminated) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.