location

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Field = "location"

Variables

This section is empty.

Functions

This section is empty.

Types

type CallerAware

type CallerAware interface {
	Location

	GetFunction() string
	GetFile() string
	GetLine() int
}

type CallerAwareImpl

type CallerAwareImpl struct {
	Function string
	File     string
	Line     int

	Mode CallerAwareMode
}

func (CallerAwareImpl) Get

func (instance CallerAwareImpl) Get() value.Value

func (*CallerAwareImpl) GetFile

func (instance *CallerAwareImpl) GetFile() string

func (*CallerAwareImpl) GetFunction

func (instance *CallerAwareImpl) GetFunction() string

func (*CallerAwareImpl) GetLine

func (instance *CallerAwareImpl) GetLine() int

type CallerAwareMode

type CallerAwareMode uint8
const (
	CallerAwareModePreferFile     CallerAwareMode = 0
	CallerAwareModePreferFunction CallerAwareMode = 1
)

type Factory

type Factory func(event log.Event, callDepth int) Location
var DefaultFactory Factory = nil

func CallerAwareFactor

func CallerAwareFactor(mode CallerAwareMode) Factory

type FactoryAware

type FactoryAware interface {
	GetLocationFactory() Factory
	SetLocationFactory(Factory)
}

type Location

type Location interface{}

func NoopFactory

func NoopFactory(log.Event, int) Location

Jump to

Keyboard shortcuts

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