query-database/api/internal/handlers/module.go
2026-03-25 15:46:20 +08:00

20 lines
409 B
Go

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
}