Applied suggested linter changes

This commit is contained in:
2018-04-26 01:14:23 +02:00
parent a45c39a916
commit e90873b64f
13 changed files with 42 additions and 79 deletions

View File

@ -45,17 +45,3 @@ func Get(ctx *aero.Context) string {
return ctx.HTML(components.Admin(user, platform, family, platformVersion, kernelVersion))
}
func average(floatSlice []float64) float64 {
if len(floatSlice) == 0 {
return 0
}
var sum float64
for _, value := range floatSlice {
sum += value
}
return sum / float64(len(floatSlice))
}

View File

@ -5,8 +5,6 @@ import (
"github.com/animenotifier/arn"
)
const maxEntries = 70
// Links shows soundtracks without links.
func Links(ctx *aero.Context) string {
return editorList(

View File

@ -7,8 +7,6 @@ import (
"github.com/animenotifier/notify.moe/utils"
)
const maxPosts = 5
// Get user profile page.
func Get(ctx *aero.Context) string {
nick := ctx.Get("nick")

View File

@ -19,11 +19,7 @@ func Active(ctx *aero.Context) string {
sort.Slice(users, func(i, j int) bool {
if users[i].HasAvatar() != users[j].HasAvatar() {
if users[i].HasAvatar() {
return true
}
return false
return users[i].HasAvatar()
}
followersA := followCount[users[i].ID]
@ -101,11 +97,7 @@ func ActiveNoAvatar(ctx *aero.Context) string {
sort.Slice(users, func(i, j int) bool {
if users[i].HasAvatar() != users[j].HasAvatar() {
if users[i].HasAvatar() {
return true
}
return false
return users[i].HasAvatar()
}
followersA := followCount[users[i].ID]