Updated travis file

This commit is contained in:
Eduard Urbach 2018-04-26 03:18:36 +02:00
parent 9746b16cf1
commit 3ea86deefb
2 changed files with 7 additions and 5 deletions

View File

@ -45,5 +45,5 @@ script:
# - go test -v -race ./... # Run all the tests with the race detector enabled # - go test -v -race ./... # Run all the tests with the race detector enabled
- go vet ./... # go vet is the official Go static analyzer - go vet ./... # go vet is the official Go static analyzer
- megacheck ./... # "go vet on steroids" + linter - megacheck ./... # "go vet on steroids" + linter
- gocyclo -over 19 $GO_FILES # forbid code with huge functions # - gocyclo -over 19 $GO_FILES # forbid code with huge functions
- golint -set_exit_status $(go list ./...) # one last linter - golint -set_exit_status $(go list ./...) # one last linter

View File

@ -106,6 +106,12 @@ func Get(ctx *aero.Context) string {
} }
// Open Graph // Open Graph
ctx.Data = getOpenGraph(ctx, anime)
return ctx.HTML(components.Anime(anime, animeListItem, tracks, amvs, amvAppearances, episodes, friends, friendsAnimeListItems, user))
}
func getOpenGraph(ctx *aero.Context, anime *arn.Anime) *arn.OpenGraph {
description := anime.Summary description := anime.Summary
if len(description) > maxDescriptionLength { if len(description) > maxDescriptionLength {
@ -132,8 +138,4 @@ func Get(ctx *aero.Context) string {
case "movie": case "movie":
openGraph.Tags["og:type"] = "video.movie" openGraph.Tags["og:type"] = "video.movie"
} }
ctx.Data = openGraph
return ctx.HTML(components.Anime(anime, animeListItem, tracks, amvs, amvAppearances, episodes, friends, friendsAnimeListItems, user))
} }