dependency/set.go
func (s *Set) Add(d Dependency) bool {
	s.init()
	s.Lock()
	defer s.Unlock()
	if _, ok := s.set[d.String()]; !ok {
		s.list = append(s.list, d.String())
		s.set[d.String()] = d
		return true
	}
	return false
}
func (s *Set) Add(d Dependency) bool {
	s.init()
	s.Lock()
	defer s.Unlock()
	if _, ok := s.set[d.String()]; !ok {
		s.list = append(s.list, d.String())
		s.set[d.String()] = d
		return true
	}
	return false
}
func ( s * Set ) Add ( d Dependency ) bool { s . init ( ) s . Lock ( ) defer s . Unlock ( ) if _ , ok := s . set [ d . String ( ) ] ; ! ok { s . list = append ( s . list , d . String ( ) ) s . set [ d . String ( ) ] = d return true } return false }
// Add adds a new element to the set if it does not already exist.
Add adds a new element to the set if it does not already exist .