Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work if struct is defined after use #19

Open
CaledoniaProject opened this issue Jul 20, 2019 · 1 comment
Open

Does not work if struct is defined after use #19

CaledoniaProject opened this issue Jul 20, 2019 · 1 comment

Comments

@CaledoniaProject
Copy link

CaledoniaProject commented Jul 20, 2019

gobfuscate does not work with the following code (shortened):

package main

import (
	"fmt"
)

type Test1 struct {
	data map[int]pathInfo
}

type pathInfo struct {
	name string
}

func main() {
	fmt.Println("Hello There!")
}

It complains with XXX has no member "pathInfo". The only solution is to modify the source code and move pathInfo definition above Test1 structure.

Can you fix it?

@CaledoniaProject
Copy link
Author

Looks like go itself scans the source code twice. Minimal case updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant