MCPcopy Index your code
hub / github.com/foxcpp/maddy / Lookup

Method Lookup

internal/table/chain.go:82–92  ·  view source on GitHub ↗
(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

80}
81
82func (s *Chain) Lookup(ctx context.Context, key string) (string, bool, error) {
83 newVal, err := s.LookupMulti(ctx, key)
84 if err != nil {
85 return "", false, err
86 }
87 if len(newVal) == 0 {
88 return "", false, nil
89 }
90
91 return newVal[0], true, nil
92}
93
94func (s *Chain) LookupMulti(ctx context.Context, key string) ([]string, error) {
95 result := []string{key}

Callers

nothing calls this directly

Calls 1

LookupMultiMethod · 0.95

Tested by

no test coverage detected