Skip to content

Commit 1e708d2

Browse files
committed
unit: simplify escape character
1 parent 0088bd4 commit 1e708d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unit/escape.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func escape(unescaped string, isPath bool) string {
5757
if c == '/' {
5858
e = append(e, '-')
5959
} else if start && c == '.' || strings.IndexByte(allowed, c) == -1 {
60-
e = append(e, []byte(fmt.Sprintf(`\x%x`, c))...)
60+
e = fmt.Appendf(e, `\x%x`, c)
6161
} else {
6262
e = append(e, c)
6363
}

0 commit comments

Comments
 (0)