feat: question tags

This commit is contained in:
httpjamesm
2023-02-04 13:40:57 -05:00
parent c87ce26da8
commit 69d96d646d
5 changed files with 37 additions and 1 deletions

13
src/utils/tags.go Normal file
View File

@ -0,0 +1,13 @@
package utils
import (
"github.com/PuerkitoBio/goquery"
)
func GetPostTags(postLayout *goquery.Selection) []string {
var tags []string
postLayout.Find("a.post-tag").Each(func(i int, s *goquery.Selection) {
tags = append(tags, s.Text())
})
return tags
}