mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
11 lines
204 B
Go
11 lines
204 B
Go
|
package stringsutil
|
||
|
|
||
|
import (
|
||
|
"github.com/valyala/quicktemplate"
|
||
|
)
|
||
|
|
||
|
// JSONString returns JSON-quoted s.
|
||
|
func JSONString(s string) string {
|
||
|
return string(quicktemplate.AppendJSONString(nil, s, true))
|
||
|
}
|