util

package
v0.0.0-...-911c31e Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WorkingPath, _ = os.Getwd()

Functions

func FileExist

func FileExist(path string) bool

func LinkServerAllower

func LinkServerAllower(a, b server.Allower) server.Allower

func Must

func Must(args ...interface{})

func MustDeleteFile

func MustDeleteFile(path string)

func MustReadFile

func MustReadFile(path string) []byte

func MustWriteFile

func MustWriteFile(path string, data []byte)

func PanicFunc

func PanicFunc(f func(v interface{}))

func SelectAnyByteSlice

func SelectAnyByteSlice(args ...interface{}) []byte

func SelectAnyString

func SelectAnyString(args ...interface{}) string

func SelectBool

func SelectBool(args ...interface{}) bool

func SelectByteSlice

func SelectByteSlice(args ...interface{}) []byte

func SelectError

func SelectError(args ...interface{}) error

func SelectNotNil

func SelectNotNil[T any](args ...interface{}) T

func SelectString

func SelectString(args ...interface{}) string

Types

type LoggerSubscriber

type LoggerSubscriber struct {
	Logger *logrus.Logger
}

LoggerSubscriber is an implementation of Subscriber that forwards messages sent to the logger

func (*LoggerSubscriber) Message

func (c *LoggerSubscriber) Message(a ...interface{})

Message ...

Jump to

Keyboard shortcuts

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