Git
Golang
bool, for JSON booleans
float64, for JSON numbers
string, for JSON strings
[]interface{}, for JSON arrays
map[string]interface{}, for JSON objects
nil for JSON null
func replace(text string, replacement map[string]string) string {
var leftPad, rightPad = `{{`, `}}`
var rgx = regexp.MustCompile(leftPad + "(.*?)" + rightPad)
rs := rgx.ReplaceAllFunc([]byte(text), func(bytes []byte) []byte {
key := bytes[len(leftPad) : len(bytes)-len(rightPad)]
log.Println(string(key))
if val, ok := replacement[string(key)]; ok && val != "" {
return []byte(val)
}
return bytes
})
return string(rs)
}
Grafana
Ansible
Draw
Goland
Linux
Asciinema
Jaeger
SSH
Service Mesh
Python
压测方案