Skip to content

Commit 03d847e

Browse files
committed
Get back HasService to case-insensitive
1 parent c0c3ad3 commit 03d847e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/java/common/context.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,11 @@ func GetVCAPServices() (VCAPServices, error) {
152152
}
153153

154154
// HasService checks if a service with the given label exists
155+
// Matching is case-insensitive to handle various service broker conventions
155156
func (v VCAPServices) HasService(label string) bool {
157+
labelLower := strings.ToLower(label)
156158
for key := range v {
157-
if strings.ToLower(key) == label {
159+
if strings.ToLower(key) == labelLower {
158160
return true
159161
}
160162
}

0 commit comments

Comments
 (0)