mirror of
https://github.com/idanoo/go-mastodon-stats
synced 2025-07-01 22:02:20 +00:00
Clean up methods
This commit is contained in:
parent
a2a5a26e0f
commit
dcbef8eb1f
3 changed files with 8 additions and 1 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
// Stores out metric/row data
|
||||
|
@ -116,5 +117,8 @@ func getUserCounts() ([]metric, error) {
|
|||
}
|
||||
|
||||
func getPrintableString(m metric) string {
|
||||
return fmt.Sprintf("%s: %d", cases.Title(m.Service), m.MetricValue)
|
||||
caser := cases.Title(language.English)
|
||||
titleStr := caser.String(m.Service)
|
||||
|
||||
return fmt.Sprintf("%s: %d", titleStr, m.MetricValue)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue