test

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAnotherBuildTagTrace added in v0.2.1

func WithAnotherBuildTagTrace(ctx context.Context, t AnotherBuildTagTrace) context.Context

WithAnotherBuildTagTrace returns context which has associated AnotherBuildTagTrace with it.

func WithBuildTagTrace added in v0.2.0

func WithBuildTagTrace(ctx context.Context, t BuildTagTrace) context.Context

WithBuildTagTrace returns context which has associated BuildTagTrace with it.

func WithTraceNoShortcut added in v0.2.4

func WithTraceNoShortcut(ctx context.Context, t TraceNoShortcut) context.Context

WithTraceNoShortcut returns context which has associated TraceNoShortcut with it.

Types

type AnotherBuildTagTrace added in v0.2.1

type AnotherBuildTagTrace struct {
	OnSomethingA func() func()
	OnSomethingB func(int8, int16) func(int32, int64)
	OnSomethingC func(Type) func(Type)
}

func ContextAnotherBuildTagTrace added in v0.2.1

func ContextAnotherBuildTagTrace(ctx context.Context) AnotherBuildTagTrace

ContextAnotherBuildTagTrace returns AnotherBuildTagTrace associated with ctx. If there is no AnotherBuildTagTrace associated with ctx then zero value of AnotherBuildTagTrace is returned.

func (AnotherBuildTagTrace) Compose added in v0.2.1

Compose returns a new AnotherBuildTagTrace which has functional fields composed both from t and x.

type BuildTagTrace added in v0.2.0

type BuildTagTrace struct {
	OnSomethingA func() func()
	OnSomethingB func(int8, int16) func(int32, int64)
	OnSomethingC func(Type) func(Type)
}

func ContextBuildTagTrace added in v0.2.0

func ContextBuildTagTrace(ctx context.Context) BuildTagTrace

ContextBuildTagTrace returns BuildTagTrace associated with ctx. If there is no BuildTagTrace associated with ctx then zero value of BuildTagTrace is returned.

func (BuildTagTrace) Compose added in v0.2.0

func (t BuildTagTrace) Compose(x BuildTagTrace) (ret BuildTagTrace)

Compose returns a new BuildTagTrace which has functional fields composed both from t and x.

type ConditionalBuildTrace added in v0.1.1

type ConditionalBuildTrace struct {
	OnSomething func()
}

func (ConditionalBuildTrace) Compose added in v0.1.1

Compose returns a new ConditionalBuildTrace which has functional fields composed both from t and x.

type Embeded added in v0.2.2

type Embeded struct {
}

type ReturnedTrace added in v0.4.0

type ReturnedTrace struct {
	OnSomething func(a, b int)

	OnFoo func(_ int, _ int)
	OnBar func(_, _ int)
	OnBaz func(int, int)
}

func (ReturnedTrace) Compose added in v0.4.0

func (t ReturnedTrace) Compose(x ReturnedTrace) (ret ReturnedTrace)

Compose returns a new ReturnedTrace which has functional fields composed both from t and x.

type ShortcutPerFieldTrace added in v0.3.0

type ShortcutPerFieldTrace struct {
	//gtrace:set shortcut
	OnFoo func()
	OnBar func()
}

func (ShortcutPerFieldTrace) Compose added in v0.3.0

Compose returns a new ShortcutPerFieldTrace which has functional fields composed both from t and x.

type Trace

type Trace struct {
	OnTest func(string) func(string)

	OnAction     func(TraceActionStart) func(TraceActionDone)
	OnActionPtr  func(*TraceActionStart) func(*TraceActionDone)
	OnSomething0 func(int8) func(int16) func(int32) func(int64)
	OnSomething1 func(int8, int16) func(int32, int64)
	OnSomething2 func(Type) func(Type) func(Type)
	OnAnother    func()
	OnAnother1   func(named string)

	// Not supported signatures:
	Skipped0 func() string
	Skipped1 func() (func(), func())
}

type TraceActionDone

type TraceActionDone struct {
	Error error
}

type TraceActionStart

type TraceActionStart struct {
	String string
	Nested Type
}

type TraceNoShortcut added in v0.2.4

type TraceNoShortcut struct {
	OnSomethingA func(Type)
	OnSomethingB func(internal.Type)
}

NOTE: must compile without unused imports error.

func ContextTraceNoShortcut added in v0.2.4

func ContextTraceNoShortcut(ctx context.Context) TraceNoShortcut

ContextTraceNoShortcut returns TraceNoShortcut associated with ctx. If there is no TraceNoShortcut associated with ctx then zero value of TraceNoShortcut is returned.

func (TraceNoShortcut) Compose added in v0.2.4

func (t TraceNoShortcut) Compose(x TraceNoShortcut) (ret TraceNoShortcut)

Compose returns a new TraceNoShortcut which has functional fields composed both from t and x.

type TraceReturningTrace added in v0.4.0

type TraceReturningTrace struct {
	OnReturnedTrace func() ReturnedTrace
}

func (TraceReturningTrace) Compose added in v0.4.0

Compose returns a new TraceReturningTrace which has functional fields composed both from t and x.

type TraceReturningTraceTags added in v0.4.3

type TraceReturningTraceTags struct {
	OnReturnedTrace func() ReturnedTrace
}

func (TraceReturningTraceTags) Compose added in v0.4.3

Compose returns a new TraceReturningTraceTags which has functional fields composed both from t and x.

type Type

type Type struct {
	Embeded
	String  string
	Integer int
	Boolean bool
	Error   error
	Reader  bytes.Reader
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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