Added lyrics display

This commit is contained in:
2018-04-13 12:20:13 +02:00
parent 16d0e17aa5
commit 06c09bc1ff
8 changed files with 100 additions and 21 deletions

View File

@ -0,0 +1,12 @@
package utils
const maxDescriptionLength = 170
// CutLongDescription cuts a long description for use in OpenGraph tags.
func CutLongDescription(description string) string {
if len(description) > maxDescriptionLength {
return description[:maxDescriptionLength-3] + "..."
}
return description
}