code: func saveGenesis(folder, network, client string, spec interface{}) {
  	path := filepath.Join(folder, fmt.Sprintf("%s-%s.json", network, client))
  
  	out, _ := json.Marshal(spec)
  	if err := ioutil.WriteFile(path, out, 0644); err != nil {
  		log.Error("Failed to save genesis file", "client", client, "err", err)
  		return
  	}
  	log.Info("Saved genesis chain spec", "client", client, "path", path)
  }
docs: // saveGenesis JSON encodes an arbitrary genesis spec into a pre-defined file.