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