Add and enforce golangci-lint (#16)

This commit is contained in:
Dave Gallant
2020-07-05 22:44:05 -04:00
committed by GitHub
parent 2ec9bca107
commit d9474be233
13 changed files with 141 additions and 59 deletions

View File

@@ -6,8 +6,8 @@ import (
"strings"
)
// StripHtmlTags uses regex to strip all html elements
func StripHtmlTags(s string) string {
// StripHTMLTags uses regex to strip all html elements
func StripHTMLTags(s string) string {
const pattern = `(<\/?[a-zA-A]+?[^>]*\/?>)*`
r := regexp.MustCompile(pattern)
groups := r.FindAllString(s, -1)