utils

package
v0.17.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidName = errors.New("webhook/utils: invalid join tag value")
	ErrNotPointer  = errors.New("webhook/utils: value must be a pointer to struct")
)

Functions

func Join added in v0.15.0

func Join(in any) error

func LoadEdges added in v0.15.0

func LoadEdges(in reflect.Type) [][2]int

func NewJoin added in v0.15.0

func NewJoin[T any](in T) (*T, error)

func NextTimeDuration added in v0.15.0

func NextTimeDuration(hour, min, sec int) time.Duration

func ParseEdges added in v0.15.0

func ParseEdges(elem reflect.Type) (edges [][2]int)

func Shell added in v0.15.0

func Shell(s string, dir string, keep bool) ([]string, error)

func SplitLines added in v0.14.0

func SplitLines(s string) (r []string)

func StrToAny added in v0.15.0

func StrToAny(conds []string) []any

Types

type DateHook added in v0.15.0

type DateHook struct {
	Format string
	// contains filtered or unexported fields
}

func (*DateHook) Close added in v0.15.0

func (d *DateHook) Close() error

func (*DateHook) Fire added in v0.15.0

func (d *DateHook) Fire(entry *logrus.Entry) (err error)

func (DateHook) Levels added in v0.15.0

func (DateHook) Levels() []logrus.Level

func (*DateHook) Open added in v0.15.0

func (d *DateHook) Open() (*os.File, error)

func (*DateHook) Write added in v0.15.0

func (d *DateHook) Write(p []byte) (int, error)

type Node added in v0.15.0

type Node struct {
	Target *Node
	// contains filtered or unexported fields
}

func (*Node) Depth added in v0.15.0

func (n *Node) Depth() int

Jump to

Keyboard shortcuts

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