mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-11 14:53:49 +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))
|
||
|
}
|