From a15a5c1f7a676e492efc21d1e32188b81a1a55b1 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 21 Mar 2020 15:58:05 +0100 Subject: [PATCH] fix: register mismatch when no brace capture --- internal/config/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/config/server.go b/internal/config/server.go index b8191fd..a0be1e1 100644 --- a/internal/config/server.go +++ b/internal/config/server.go @@ -93,8 +93,8 @@ func (server *Server) collide() error { if !aIsCapture && !bIsCapture { if aPart == bPart { partErrors = append(partErrors, fmt.Errorf("(%s '%s') vs (%s '%s'): %w (same path '%s')", aService.Method, aService.Pattern, bService.Method, bService.Pattern, ErrPatternCollision, aPart)) + continue } - continue } // A captures B -> check type (B is A ?) @@ -114,7 +114,7 @@ func (server *Server) collide() error { } // B captures A -> check type (A is B ?) - } else { + } else if bIsCapture { input, exists := bService.Input[bPart] // fail if no type or no validator