fix golint issues in core/stringx (#516)

This commit is contained in:
Kevin Wan
2021-02-24 16:09:07 +08:00
committed by GitHub
parent acdaee0fb6
commit 04b0f26182
4 changed files with 23 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package stringx
import "strings"
type (
// Replacer interface wraps the Replace method.
Replacer interface {
Replace(text string) string
}
@@ -13,6 +14,7 @@ type (
}
)
// NewReplacer returns a Replacer.
func NewReplacer(mapping map[string]string) Replacer {
var rep = &replacer{
mapping: mapping,