{"record":{"id":"aaabed110a955f86","repo":"go-delve/delve","slug":"package-s-has-no-function-s","errorCode":null,"errorMessage":"package %s has no function %s","messagePattern":"package (.+?) has no function (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/eval.go","lineNumber":3043,"sourceCode":"\tclosure := false\n\tswitch v.Kind {\n\tcase reflect.Chan:\n\t\tv = v.clone()\n\t\tv.RealType = godwarf.ResolveTypedef(&(v.RealType.(*godwarf.ChanType).TypedefType))\n\tcase reflect.Interface:\n\t\tv.loadInterface(0, false, LoadConfig{})\n\t\tif len(v.Children) > 0 {\n\t\t\tv = &v.Children[0]\n\t\t}\n\tcase reflect.Func:\n\t\tfn := v.bi.PCToFunc(v.Base)\n\t\tv.loadFunctionPtr(0, LoadConfig{MaxVariableRecurse: -1})\n\t\tif v.Unreadable != nil {\n\t\t\tcst := fn.extra(v.bi).closureStructType\n\t\t\tif cst == nil || cst.ByteSize == 0 {\n\t\t\t\t// Not a closure, normal function\n\t\t\t\tif _, ok := v.bi.PackageMap[vname]; ok {\n\t\t\t\t\treturn nil, fmt.Errorf(\"package %s has no function %s\", vname, name)\n\t\t\t\t}\n\t\t\t\treturn nil, fmt.Errorf(\"%s has no member %s\", vname, name)\n\t\t\t}\n\t\t\treturn nil, v.Unreadable\n\t\t}\n\t\tif v.closureAddr != 0 {\n\t\t\tfn = v.bi.PCToFunc(v.Base)\n\t\t\tif fn != nil {\n\t\t\t\tcst := fn.extra(v.bi).closureStructType\n\t\t\t\tv = v.newVariable(v.Name, v.closureAddr, cst, v.mem)\n\t\t\t\tclosure = true\n\t\t\t}\n\t\t}\n\t}\n\n\tqueue := []*Variable{v}\n\tseen := map[string]struct{}{}\n\tfirst := true","sourceCodeStart":3025,"sourceCodeEnd":3061,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/eval.go#L3025-L3061","documentation":"Raised when evaluating a member on what looks like a function/package symbol. If the target is a normal (non-closure) function and its package vname is known to the binary info (bi.PackageMap), but no function 'name' exists in that package, Delve reports 'package <pkg> has no function <name>'. This is the package-qualified variant of the no-member error for function values.","triggerScenarios":"Evaluating pkg.Func or calling/inspecting a function member where v.loadFunctionPtr determined the value is a plain function, vname is a known package in PackageMap, and 'name' is not any function in that package (typo or wrong package).","commonSituations":"Typos like fmt.PrintLn (capital L); referencing a function that was inlined away or removed in the built version; wrong package name in qualified expressions (e.g. strings.Title removed in newer Go).","solutions":["Check spelling and case of the function name (Go is case-sensitive)","Use the correct package path as known to the binary (print the variable first or use 'whatis')","Verify the function still exists in the version of the package compiled into the binary","If the function was inlined, breakpoints/lookup may need the non-inlined name or a line-based breakpoint"],"exampleFix":"// before\nprint(fmt.PrintLn(\"x\"))    // no such function\n// after\nprint(fmt.Println(\"x\"))    // correct name","handlingStrategy":"validation","validationCode":"// verify the function exists in the package:\nbreak fmt.Println   // or: print fmt.Println\n// check exact spelling and case first","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Go identifiers are case-sensitive — double-check capitalization","Confirm the symbol exists in the compiled version of the dependency","Remember function values may be inlined; use line-based breakpoints for inlined code"],"tags":["go","debugger","function","package"],"backgroundTag":"no-such-member","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}