utils

package
v0.0.0-...-5e00ec5 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 7 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExist

func FileExist(path string) (bool, error)

FileExist 判断文件是否存在

func GetModuleLogger

func GetModuleLogger(name string) *logrus.Entry

GetModuleLogger - 提供一个为 Module 使用的 logrus.Entry 包含 logrus.Fields

func ReadFile

func ReadFile(path string) []byte

ReadFile 读取文件 读取失败返回 nil

func WriteLogToFS

func WriteLogToFS()

WriteLogToFS 将日志转储至文件 请务必在 init() 阶段调用此函数 否则会出现日志缺失 日志存储位置 ./logs

func WriteLogToPath

func WriteLogToPath(p string)

WriteLogToPath 将日志转储至文件 请务必在 init() 阶段调用此函数 否则会出现日志缺失 日志存储位置 p

Types

This section is empty.

Jump to

Keyboard shortcuts

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