//Check used to check if connection success (without any bind).
Check used to check if connection success (without any bind).
// Check used to check if connection success ( without any bind ) .
func (lc *HelperLDAP) Check() liberr.Error {
	if lc == nil {
		return ErrorEmptyParams.Error(nil)
	}
	if lc.conn == nil {
		defer func() {
			if lc.conn != nil {
				lc.conn.Close()
				lc.conn = nil
			}
		}()
	}
	if err := lc.connect(); err != nil {
		lc.Close()
		return err
	}
	return nil
}
func ( lc * HelperLDAP ) Check ( ) liberr . Error { if lc == nil { return ErrorEmptyParams . Error ( nil ) } if lc . conn == nil { defer func ( ) { if lc . conn != nil { lc . conn . Close ( ) lc . conn = nil } } ( ) } if err := lc . connect ( ) ; err != nil { lc . Close ( ) return err } return nil }
Check used to check if connection success (without any bind).
Check used to check if connection success ( without any bind ) .