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