fx: go.uber.org/fx/internal/fxreflect Index | Files

package fxreflect

import "go.uber.org/fx/internal/fxreflect"


Package Files

fxreflect.go stack.go

func Caller Uses

func Caller() string

Caller returns the formatted calling func name

func FuncName Uses

func FuncName(fn interface{}) string

FuncName returns a funcs formatted name

func ReturnTypes Uses

func ReturnTypes(t interface{}) []string

ReturnTypes takes a func and returns a slice of string'd types.

type Frame Uses

type Frame struct {
    // Unique, package path-qualified name for the function of this call
    // frame.
    Function string

    // File and line number of our location in the frame.
    // Note that the line number does not refer to where the function was
    // defined but where in the function the next call was made.
    File string
    Line int

Frame holds information about a single frame in the call stack.

func (Frame) String Uses

func (f Frame) String() string

type Stack Uses

type Stack []Frame

Stack is a stack of call frames.

Formatted with %v, the output is in a single-line, in the form,

foo/bar.Baz() (path/to/foo.go:42); bar/baz.Qux() (bar/baz/qux.go:12); ...

Formatted with %+v, the output is in the form,


func CallerStack Uses

func CallerStack(skip, depth int) Stack

CallerStack returns the call stack for the calling function, up to depth frames deep, skipping the provided number of frames, not including Callers itself.

If zero, depth defaults to 8.

func (Stack) CallerName Uses

func (fs Stack) CallerName() string

CallerName returns the name of the first caller in this stack that isn't owned by the Fx library.

func (Stack) Format Uses

func (fs Stack) Format(w fmt.State, c rune)

Format implements fmt.Formatter to handle "%+v".

func (Stack) String Uses

func (fs Stack) String() string

Returns a single-line, semi-colon representation of a Stack. For a multi-line representation, use %+v.

Package fxreflect imports 8 packages (graph) and is imported by 5 packages. Updated 2019-11-20. Refresh now. Tools for package owners.