Applied suggested linter changes
This commit is contained in:
@ -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))
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -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")
|
||||
|
@ -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]
|
||||
|
Reference in New Issue
Block a user