code: func receiverType(fn *ast.FuncDecl) string {
  	switch e := fn.Recv.List[0].Type.(type) {
  	case *ast.Ident:
  		return e.Name
  	case *ast.StarExpr:
  		if id, ok := e.X.(*ast.Ident); ok {
  			return id.Name
  		}
  	}
  	// The parser accepts much more than just the legal forms.
  	return "invalid-type"
  }
docs: // receiverType returns the named type of the method receiver, sans "*",
  // or "invalid-type" if fn.Recv is ill formed.