Exemple #1
0
func get_editor() (editor string) {
	editor = os.Getenv("EDITOR")
	cnf, err := neyo.ReadConfig(".")
	if err != nil {
		neyo.Log(neyo.ERROR, "Read config error %s", err)
	} else if ed, ok := cnf["editor"].(string); ok {
		editor = ed
	}
	return
}
Exemple #2
0
func _config() {
	cnf, err := neyo.ReadConfig(".")
	if err != nil {
		neyo.Log(neyo.ERROR, "Read config error %s", err)
	}
	buf, err := json.MarshalIndent(cnf, "", "  ")
	if err != nil {
		neyo.Log(neyo.ERROR, "Marshal error %s", err)
	}
	fmt.Printf("Global config: \n%s\n", string(buf))
}