MCPcopy Create free account
hub / github.com/cogentcore/core / isAnonymousFunction

Function isAnonymousFunction

core/funcbutton.go:233–237  ·  view source on GitHub ↗
(fnm string)

Source from the content-addressed store, hash-verified

231}
232
233func isAnonymousFunction(fnm string) bool {
234 // FuncName.funcN indicates that a function was defined anonymously
235 funcN := len(fnm) > 0 && unicode.IsDigit(rune(fnm[len(fnm)-1])) && strings.Contains(fnm, ".func")
236 return funcN || fnm == "reflect.makeFuncStub" // used for anonymous functions in yaegi
237}
238
239// setFuncImpl is the underlying implementation of [FuncButton.SetFunc].
240// It should typically not be used by end-user code.

Callers 2

SetFuncMethod · 0.85
setFuncImplMethod · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected