MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / FilterLabel

Method FilterLabel

strategy-filter/filter.go:154–168  ·  view source on GitHub ↗
(name string, values []string)

Source from the content-addressed store, hash-verified

152}
153
154func (f *Handler) FilterLabel(name string, values []string) (*Info, error) {
155 if tmp, has := f.remoteFilters.Get(name); has {
156 return &Info{
157 Title: tmp.Title(),
158 Label: strings.Join(tmp.Labels(values...), ","),
159 }, nil
160 }
161 if tmp, has := f.filters.Get(name); has {
162 return &Info{
163 Title: tmp.Title(),
164 Label: strings.Join(tmp.Labels(values...), ","),
165 }, nil
166 }
167 return nil, fmt.Errorf("filter %s not found", name)
168}
169
170func RegisterRemoteFilter(filter IRemoteFilter) {
171 filterHandler.RegisterRemoteFilter(filter)

Callers

nothing calls this directly

Calls 3

GetMethod · 0.65
TitleMethod · 0.65
LabelsMethod · 0.65

Tested by

no test coverage detected