aboutsummaryrefslogtreecommitdiff
path: root/bytesconv.go
diff options
context:
space:
mode:
authorGravatar Oleksandr Redko <oleksandr.red+github@gmail.com> 2024-02-21 06:51:28 +0200
committerGravatar GitHub <noreply@github.com> 2024-02-21 05:51:28 +0100
commit190204cf1a4f9999e2739d3825967df445d82d7c (patch)
treed1acd3796778b24edfd2677e52ed69a1ca3eae5c /bytesconv.go
parentRemove unnecessary build tag go1.21 (#1721) (diff)
downloadfasthttp-190204cf1a4f9999e2739d3825967df445d82d7c.tar.gz
fasthttp-190204cf1a4f9999e2739d3825967df445d82d7c.tar.bz2
fasthttp-190204cf1a4f9999e2739d3825967df445d82d7c.zip
Upgrade golangci-lint to v1.56.2; fix gocritic issues (#1722)
Diffstat (limited to 'bytesconv.go')
-rw-r--r--bytesconv.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/bytesconv.go b/bytesconv.go
index b3cf29e..4e36d1d 100644
--- a/bytesconv.go
+++ b/bytesconv.go
@@ -35,7 +35,7 @@ func AppendHTMLEscape(dst []byte, s string) []byte {
case '\'':
sub = "&#39;" // "&#39;" is shorter than "&apos;" and apos was not in HTML until HTML5.
}
- if len(sub) > 0 {
+ if sub != "" {
dst = append(dst, s[prev:i]...)
dst = append(dst, sub...)
prev = i + 1