Example #1
0
func installHooks() error {
	for i, ed := range editor.List() {
		if *instArgs[i] {
			if err := ed.Install(); err != nil {
				return log4go.Error("Failed to install editor plugin for %s: %s", ed.Description(), err)
			}
		}
	}
	return nil
}
Example #2
0
func installFlagInit(fs *flag.FlagSet) {
	for _, ed := range editor.List() {
		instArgs = append(instArgs, fs.Bool(ed.Name(), false, ed.Description()))
	}
}