mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 07:22:24 -05:00
first implementation of search feature
This commit is contained in:
parent
cb54324430
commit
0fe853b1ee
20 changed files with 763 additions and 19 deletions
|
|
@ -77,6 +77,11 @@ func ExtractMentionParts(mention string) (username, domain string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
// IsMention returns true if the passed string looks like @whatever@example.org
|
||||
func IsMention(mention string) bool {
|
||||
return mentionNameRegex.MatchString(strings.ToLower(mention))
|
||||
}
|
||||
|
||||
// unique returns a deduplicated version of a given string slice.
|
||||
func unique(s []string) []string {
|
||||
keys := make(map[string]bool)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue