MCPcopy
hub / github.com/rs/zerolog / getEvent

Function getEvent

cmd/lint/lint.go:81–93  ·  view source on GitHub ↗
(p *loader.Program)

Source from the content-addressed store, hash-verified

79}
80
81func getEvent(p *loader.Program) types.Type {
82 for _, pkg := range p.AllPackages {
83 if strings.HasSuffix(pkg.Pkg.Path(), "github.com/rs/zerolog") {
84 for _, d := range pkg.Defs {
85 if d != nil && d.Name() == "Event" {
86 return d.Type()
87 }
88 }
89 }
90 }
91
92 return nil
93}
94
95func getSelectionsWithReceiverType(p *loader.Program, targetType types.Type) map[token.Pos]selection {
96 selections := map[token.Pos]selection{}

Callers 1

mainFunction · 0.85

Calls 1

TypeMethod · 0.45

Tested by

no test coverage detected