You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: lookup.go
    path of file: ./repos/gomacro/xreflect
    
    the code of the file until where you have to start completion: /*
 * gomacro - A Go interpreter with Lisp-like macros
 *
 * Copyright (C) 2017-2019 Massimiliano Ghilardi
 *
 *     This Source Code Form is subject to the terms o
    
func (t *xtype) methodByName(name, pkgpath string) (method Method, count int) {
	if name == "_" || !canHaveMethods(t) {
		return
	}
	qname := QName2(name, pkgpath)
	method, found := t.cache.method[qname]
	// debugf("methodByName type = %v, qname = %v: found = %v method in cache = %v", t, qname, found, method)
	if found {
		index := method.Index
		if index < 0 { // marker for ambiguous method names
			count = -index
		} else {
			count = 1
		}
		return method, count
	}
	var visited depthMap
	method, count = methodByName(t, qname, nil)
	if count == 0 {
		tovisit := anonymousFields(t, 0, nil, &visited)
		// breadth-first recursion on struct's anonymous fields
		for count == 0 && len(tovisit) != 0 {
			var next []StructField
			for _, f := range tovisit {
				et := unwrap(f.Type)
				emethod, ecount := methodByName(et, qname, f.Index)
				if count == 0 {
					if ecount > 0 {
						method = emethod
					} else {
						// no recursion if we found something
						next = append(next, anonymousFields(et, f.Offset, f.Index, &visited)...)
					}
				}
				count += ecount
			}
			tovisit = next
		}
	}
	if count > 0 {
		cacheMethodByName(t, qname, &method, count)
	}
	return method, count
}