Skip to content

add anonymous function support #5

@katsusan

Description

@katsusan

if (!code.includes('func '+funcname)) {
setMessageBox('GOFUNCNAME does not exist in your code.', false)
return
}

Currently 'func '+funcname cannot cover the case of anonymous functions.
Eg, in following code func() {x++} can be resolved by GOSSAFUNC=main.func1.

func main() { var x int go func() { x++	}() }

And there are more complicated cases (such as nested anonymous functions),
I think before further code analysis is integrated in frontend, it's better to temporarily remove this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions