Skip to content

Commit 2753f55

Browse files
committed
feat(envfile): add Keys method to retrieve connection entry names in lowercase
1 parent 3cd7466 commit 2753f55

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

core/dbio/connection/connection_local.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,3 +394,12 @@ func (ec *EnvFileConns) GetConnEntry(name string) (conn ConnEntry, ok bool) {
394394
conn = entries.Get(name)
395395
return conn, conn.Name != ""
396396
}
397+
398+
func (ec *EnvFileConns) Keys() []string {
399+
var keys []string
400+
entries, _ := ec.ConnectionEntries()
401+
for _, entry := range entries {
402+
keys = append(keys, strings.ToLower(entry.Name))
403+
}
404+
return keys
405+
}

0 commit comments

Comments
 (0)