Starting with a simple travis file
This commit is contained in:
parent
e90873b64f
commit
4b423f036a
@ -39,7 +39,8 @@ before_script:
|
||||
# in a modern Go project.
|
||||
script:
|
||||
- test -z $(gofmt -s -l $GO_FILES) # Fail if a .go file hasn't been formatted with gofmt
|
||||
- go test -v -race ./... # Run all the tests with the race detector enabled
|
||||
# - go test -v . # Run all the tests
|
||||
# - go test -v -race ./... # Run all the tests with the race detector enabled
|
||||
- go vet ./... # go vet is the official Go static analyzer
|
||||
- megacheck ./... # "go vet on steroids" + linter
|
||||
- gocyclo -over 19 $GO_FILES # forbid code with huge functions
|
||||
|
@ -79,6 +79,13 @@ func CompareMAL(ctx *aero.Context) string {
|
||||
return aPop > bPop
|
||||
})
|
||||
|
||||
comparisons := compare(animes)
|
||||
|
||||
return ctx.HTML(components.CompareMAL(comparisons, year, status, typ, "/editor/mal/diff/anime", user))
|
||||
}
|
||||
|
||||
// compare builds the comparisons to MAL anime entries.
|
||||
func compare(animes []*arn.Anime) []*utils.MALComparison {
|
||||
comparisons := []*utils.MALComparison{}
|
||||
malAnimeCollection := arn.MAL.Collection("Anime")
|
||||
|
||||
@ -225,5 +232,5 @@ func CompareMAL(ctx *aero.Context) string {
|
||||
}
|
||||
}
|
||||
|
||||
return ctx.HTML(components.CompareMAL(comparisons, year, status, typ, "/editor/mal/diff/anime", user))
|
||||
return comparisons
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user