func (u *Unit) Enable() (err error) {
	err = u.System.getAndExecute(u.RequiredBy(), func(dep *Unit, gerr error) error {
		if gerr != nil {
			return gerr
		}

		return dep.addRequiresDep(u)
	})
	if err != nil {
		return
	}

	return u.System.getAndExecute(u.WantedBy(), func(dep *Unit, gerr error) error {
		if gerr != nil {
			return gerr
		}

		return dep.addWantsDep(u)
	})
}
// Enable creates symlinks to u definition in dependency directories of each unit dependant on u
Enable creates symlinks to u definition in dependency directories of each unit dependant on u
// Enable creates symlinks to u definition in dependency directories of each unit dependant on u
func (u *Unit) Enable() (err error) {
	err = u.System.getAndExecute(u.RequiredBy(), func(dep *Unit, gerr error) error {
		if gerr != nil {
			return gerr
		}
		return dep.addRequiresDep(u)
	})
	if err != nil {
		return
	}
	return u.System.getAndExecute(u.WantedBy(), func(dep *Unit, gerr error) error {
		if gerr != nil {
			return gerr
		}
		return dep.addWantsDep(u)
	})
}
func ( u * Unit ) Enable ( ) ( err error ) { err = u . System . getAndExecute ( u . RequiredBy ( ) , func ( dep * Unit , gerr error ) error { if gerr != nil { return gerr } return dep . addRequiresDep ( u ) } ) if err != nil { return } return u . System . getAndExecute ( u . WantedBy ( ) , func ( dep * Unit , gerr error ) error { if gerr != nil { return gerr } return dep . addWantsDep ( u ) } ) }
Enable creates symlinks to u definition in dependency directories of each unit dependant on u
Enable creates symlinks to u definition in dependency directories of each unit dependant on u