mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-20 23:46:23 +01: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))
|
||
|
}
|