Build the map inline in CountAllFeeds()
No need to build an empty map to then add more fields in it one by one.
This commit is contained in:
parent
04916a57d2
commit
1955350318
1 changed files with 5 additions and 3 deletions
|
@ -64,9 +64,11 @@ func (s *Storage) CountAllFeeds() map[string]int64 {
|
||||||
}
|
}
|
||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
results := make(map[string]int64)
|
results := map[string]int64{
|
||||||
results["enabled"] = 0
|
"enabled": 0,
|
||||||
results["disabled"] = 0
|
"disabled": 0,
|
||||||
|
"total": 0,
|
||||||
|
}
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var disabled bool
|
var disabled bool
|
||||||
|
|
Loading…
Reference in a new issue