fileline

package
v0.0.0-...-83feed8 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 4 Imported by: 0

README

FileLine

获取的代码文件名和行号,格式为xxxx.go:1234

定义

func NewFileLineCache() func(key string) string
func FileLine() string 

样例

// global
var _fileline_ = ioutil.NewCachedFileLine()

// use 高频使用用缓存
log.Warn("some thing wrong",_fileline_("1.push.jjj.com"))
log.Warn("some thing wrong",_fileline_("2.push.jjj.com"))

// 低频使用
log.Warn("some thing wrong",ioutil.FileLine())

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CachedFileLine

func CachedFileLine() func(key string) string

func FileLine

func FileLine(opts ...int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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