MCPcopy Create free account
hub / github.com/foxcpp/maddy / Lookup

Function Lookup

internal/auth/shadow/read.go:87–100  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

85}
86
87func Lookup(name string) (*Entry, error) {
88 entries, err := Read()
89 if err != nil {
90 return nil, err
91 }
92
93 for _, entry := range entries {
94 if entry.Name == name {
95 return &entry, nil
96 }
97 }
98
99 return nil, ErrNoSuchUser
100}

Callers 3

mainFunction · 0.92
LookupMethod · 0.85
AuthPlainMethod · 0.85

Calls 1

ReadFunction · 0.70

Tested by

no test coverage detected