func (t queryTarget) discover(o types.Object) bool {
	if o == nil {
		return false
	}
	for lookingFor := range t.unfound {
		debugf("(%v) == (%v): %t", o, lookingFor, o == lookingFor)
		if o == lookingFor {
			debugf("found %v", o.Name())
			delete(t.unfound, o)
			return true
		}
		if tn, ok := lookingFor.(*types.TypeName); ok {
			debugf("type name: (%v) (%T) == (%v): %t", o.Type(), o.Type(), tn.Type(), o.Type() == tn.Type())
			if tn.Type() == o.Type() {
				delete(t.unfound, lookingFor)
				return true
			}
			// Dereference pointers, too, if required.
			ot := o.Type()
			for true {
				ptr, ok := ot.(*types.Pointer)
				if !ok {
					break
				}
				ot = ptr.Elem()
				if tn.Type() == ot {
					delete(t.unfound, lookingFor)
					return true
				}
			}
			if _, ok := o.Type().(*types.Pointer); ok {

			}
		}
	}
	return false
}
// discover marks o as found, if it's in t's set of unfound objects. It returns
// true if it was looking for o.
discover marks o as found, if it's in t's set of unfound objects. It returns
true if it was looking for o.
// discover marks o as found if it ' s in t ' s set of unfound objects . It returns // true if it was looking for o .
func (t queryTarget) discover(o types.Object) bool {
	if o == nil {
		return false
	}
	for lookingFor := range t.unfound {
		debugf("(%v) == (%v): %t", o, lookingFor, o == lookingFor)
		if o == lookingFor {
			debugf("found %v", o.Name())
			delete(t.unfound, o)
			return true
		}
		if tn, ok := lookingFor.(*types.TypeName); ok {
			debugf("type name: (%v) (%T) == (%v): %t", o.Type(), o.Type(), tn.Type(), o.Type() == tn.Type())
			if tn.Type() == o.Type() {
				delete(t.unfound, lookingFor)
				return true
			}
			ot := o.Type()
			for true {
				ptr, ok := ot.(*types.Pointer)
				if !ok {
					break
				}
				ot = ptr.Elem()
				if tn.Type() == ot {
					delete(t.unfound, lookingFor)
					return true
				}
			}
			if _, ok := o.Type().(*types.Pointer); ok {
			}
		}
	}
	return false
}
func ( t queryTarget ) discover ( o types . Object ) bool { if o == nil { return false } for lookingFor := range t . unfound { debugf ( " " , o , lookingFor , o == lookingFor ) if o == lookingFor { debugf ( " " , o . Name ( ) ) delete ( t . unfound , o ) return true } if tn , ok := lookingFor . ( * types . TypeName ) ; ok { debugf ( " " , o . Type ( ) , o . Type ( ) , tn . Type ( ) , o . Type ( ) == tn . Type ( ) ) if tn . Type ( ) == o . Type ( ) { delete ( t . unfound , lookingFor ) return true } ot := o . Type ( ) for true { ptr , ok := ot . ( * types . Pointer ) if ! ok { break } ot = ptr . Elem ( ) if tn . Type ( ) == ot { delete ( t . unfound , lookingFor ) return true } } if _ , ok := o . Type ( ) . ( * types . Pointer ) ; ok { } } } return false }
discover marks o as found, if it's in t's set of unfound objects.
discover marks o as found if it ' s in t ' s set of unfound objects .
// Dereference pointers, too, if required.