Fixed a few linter hints
This commit is contained in:
@ -15,5 +15,5 @@ func Redirect(ctx aero.Context) error {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in")
|
||||
}
|
||||
|
||||
return ctx.Redirect(http.StatusTemporaryRedirect, "/+" + user.Nick + ctx.Path())
|
||||
return ctx.Redirect(http.StatusTemporaryRedirect, "/+"+user.Nick+ctx.Path())
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ package editor
|
||||
|
||||
import (
|
||||
"github.com/akyoto/hash"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/mal"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
"github.com/animenotifier/notify.moe/utils/animediff"
|
||||
)
|
||||
|
@ -4,8 +4,8 @@ import (
|
||||
"sort"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/kitsu"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"github.com/animenotifier/notify.moe/utils/animediff"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/mal"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
@ -122,7 +122,8 @@ func compare(animes []*arn.Anime) []*utils.MALComparison {
|
||||
|
||||
// diff returns all the differences between an anime and its MAL counterpart.
|
||||
func diff(anime *arn.Anime, malAnime *mal.Anime) []animediff.Difference {
|
||||
// nolint (prealloc linter would complain, but this is best left as nil by default)
|
||||
// Prealloc linter would complain, but this is best left as nil by default.
|
||||
// nolint:prealloc
|
||||
var differences []animediff.Difference
|
||||
|
||||
// We'll use the following diffs
|
||||
|
@ -6,8 +6,8 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/kitsu"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
@ -7,8 +7,8 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/mal"
|
||||
"github.com/animenotifier/notify.moe/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
@ -47,11 +47,12 @@ func Anime(ctx aero.Context) error {
|
||||
continue
|
||||
}
|
||||
|
||||
if anime.Type == "tv" {
|
||||
switch anime.Type {
|
||||
case "tv":
|
||||
tv = append(tv, anime)
|
||||
} else if anime.Type == "movie" {
|
||||
case "movie":
|
||||
movies = append(movies, anime)
|
||||
} else {
|
||||
default:
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package upload
|
||||
|
||||
// We need these to decode uploaded images.
|
||||
import (
|
||||
// We need these to decode uploaded images.
|
||||
_ "image/gif"
|
||||
_ "image/jpeg"
|
||||
_ "image/png"
|
||||
|
Reference in New Issue
Block a user