Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

feat: add html text cut pkg

LinkinStar8ac92750a41b
diff --git a/pkg/htmltext/htmltext.go b/pkg/htmltext/htmltext.go
index e2acb315..31ae1a22 100644
--- a/pkg/htmltext/htmltext.go
+++ b/pkg/htmltext/htmltext.go
@@ -1,10 +1,9 @@
package htmltext
import (
+ "github.com/grokify/html-strip-tags-go"
"regexp"
"strings"
-
- "github.com/grokify/html-strip-tags-go"
)
// ClearText clear HTML, get the clear text
diff --git a/pkg/htmltext/htmltext_test.go b/pkg/htmltext/htmltext_test.go
index 568299af..71aafbb6 100644
--- a/pkg/htmltext/htmltext_test.go
+++ b/pkg/htmltext/htmltext_test.go
@@ -1,9 +1,8 @@
package htmltext
import (
- "testing"
-
"github.com/stretchr/testify/assert"
+ "testing"
)
func TestClearText(t *testing.T) {