runtime

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ControllerFrom

func ControllerFrom(ctx context.Context) (string, bool)

ControllerFrom extract controller from context

func GetController

func GetController(ctx context.Context) string

GetController retrieve controller from context. Fall back to find controller in call trace if not empty.

func GetControllerInCaller

func GetControllerInCaller() string

GetControllerInCaller extract controller name from the stack of callers It identifies xxxcontroller.go or xxx_controller.go files in the caller trace

func IsNil

func IsNil(i any) bool

IsNil check if the given object is nil, it also returns false for nil ptr,

func Must

func Must[T any](t T, err error) T

Must panics on non-nil errors.

func WithController

func WithController(ctx context.Context, controller string) context.Context

WithController store controller in context

Types

This section is empty.

Jump to

Keyboard shortcuts

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