package util // H is a shortcut for creating a json-like object type H map[string]interface{} // Apply is like Object.apply from JS and merges the given objects on top of target func (target H) Apply(sources ...H) H { for _, source := range sources { for k, v := range source { target[k] = v } } return target }