Skip to content

Commit e6be598

Browse files
Al-Pragliolapboyd
andcommitted
feat: apply suggestions from code review
Co-authored-by: Paul Boyd <paul@pboyd.io> Signed-off-by: Alessio Pragliola <83355398+Al-Pragliola@users.noreply.github.com>
1 parent cb3c16e commit e6be598

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

catalog/internal/catalog/model_filter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func newCompiledPattern(field string, idx int, raw string) (*compiledPattern, er
2525

2626
// Convert a simple glob (only supporting '*') into a regexp.
2727
var b strings.Builder
28-
b.WriteString("^")
28+
b.WriteString("(?i)^")
2929
for _, r := range value {
3030
if r == '*' {
3131
b.WriteString(".*")

catalog/internal/catalog/yaml_catalog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ func (p *yamlModelProvider) read() (*yamlCatalog, error) {
364364
func (p *yamlModelProvider) emit(ctx context.Context, catalog *yamlCatalog, out chan<- ModelProviderRecord) {
365365
done := ctx.Done()
366366
for _, model := range catalog.Models {
367-
if p.filter != nil && !p.filter.Allows(model.Name) {
367+
if !p.filter.Allows(model.Name) {
368368
continue
369369
}
370370

0 commit comments

Comments
 (0)