lex

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: MIT Imports: 8 Imported by: 0

README

lex

Example

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppName string

Functions

func GetLocalIPs added in v0.1.0

func GetLocalIPs() []string

func NewFileWriter added in v0.1.0

func NewFileWriter(fileName string) (io.Writer, error)

func NewLogger added in v0.1.0

func NewLogger(tags map[string]string, writers ...io.Writer) zerolog.Logger

func NewRollingWriter added in v0.1.0

func NewRollingWriter(fileName string, maxSize, maxAge, maxBackups int, compress, localtime bool) io.Writer

maxSize:unit megabytes, maxAge:unit days

func NewStderrWriter added in v0.1.0

func NewStderrWriter() io.Writer

func NewStdoutWriter added in v0.1.0

func NewStdoutWriter() io.Writer

Types

type CodeError

type CodeError struct {
	App       string `json:",omitempty"`
	ErrorCode int
	Message   string
}

func NewCodeError

func NewCodeError(code int, message string) *CodeError

func (*CodeError) Error

func (s *CodeError) Error() string

type FieldError

type FieldError struct {
	CodeError
	FieldErrors map[string]string
}

func NewFieldError

func NewFieldError(fieldErrors map[string]string) *FieldError

func NewFieldErrorKV

func NewFieldErrorKV(kvs ...string) *FieldError

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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