di

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructorName

func ConstructorName(fn any) string

ConstructorName 返回稳定的 package.Func 诊断名。

func DebugEnabled

func DebugEnabled() bool

DebugEnabled 是否开启 DI 调试输出。

func ValidateBind

func ValidateBind(bind any) error

ValidateBind 校验 Binds()/Provide 的构造函数形态。 必须是函数,且至少有一个返回值(推荐 (T, error) 或 T)。

func Visualize

func Visualize(c *dig.Container) string

Visualize 返回 dig 容器依赖图文本;失败时返回错误信息。

Types

This section is empty.

Source Files

  • diagnose.go
  • validate.go

Jump to

Keyboard shortcuts

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