Пример #1
0
func handlePostJson(w http.ResponseWriter, r *http.Request) {
	var newkv = make(map[string]string)
	decoder := json.NewDecoder(r.Body)
	err := decoder.Decode(&newkv)
	if err != nil {
		log.Print(err)
	}
	data.Replace(newkv)
}
Пример #2
0
func Replace(newkv map[string]string) {
	data.Replace(newkv)
}