package handlers import "query-database/api/internal/mockdata" type moduleDatabase struct { Key string Name string SchemaName string } func moduleDatabaseByKey(key string) (*moduleDatabase, bool) { ms := mockdata.List() for i := range ms { if ms[i].Key == key { return &moduleDatabase{Key: ms[i].Key, Name: ms[i].Name, SchemaName: ms[i].SchemaName}, true } } return nil, false }