MCPcopy Index your code
hub / github.com/uber-go/fx / String

Method String

annotated.go:1629–1646  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1627}
1628
1629func (ann annotated) String() string {
1630 var sb strings.Builder
1631 sb.WriteString("fx.Annotate(")
1632 sb.WriteString(fxreflect.FuncName(ann.Target))
1633 if tags := ann.ParamTags; len(tags) > 0 {
1634 fmt.Fprintf(&sb, ", fx.ParamTags(%q)", tags)
1635 }
1636 if tags := ann.ResultTags; len(tags) > 0 {
1637 fmt.Fprintf(&sb, ", fx.ResultTags(%q)", tags)
1638 }
1639 if as := ann.As; len(as) > 0 {
1640 fmt.Fprintf(&sb, ", fx.As(%v)", as)
1641 }
1642 if from := ann.From; len(from) > 0 {
1643 fmt.Fprintf(&sb, ", fx.From(%v)", from)
1644 }
1645 return sb.String()
1646}
1647
1648// Build builds and returns a constructor based on fx.In/fx.Out params and
1649// results wrapping the original constructor passed to fx.Annotate.

Callers

nothing calls this directly

Calls 3

FuncNameFunction · 0.92
WriteStringMethod · 0.80
StringMethod · 0.65

Tested by

no test coverage detected