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

Restructure example Go #3

Closed
kjk opened this issue Aug 2, 2019 · 2 comments
Closed

Restructure example Go #3

kjk opened this issue Aug 2, 2019 · 2 comments

Comments

@kjk
Copy link
Contributor

@kjk kjk commented Aug 2, 2019

For a library, an idiomatic Go way of structuring it would be to have the code at the top-level instead of in pkg/parser.

Such naming is usually used when the top-level is an application but the repo also contains re-usable (by others) packages, in which case those re-usable packages are under pkg/.

Also, go-fuzz-build doesn't support multiple-packages so go-fuzz-build -libfuzzer -o fuzzer.a ./... doesn't work in general case.

It only happens to work because there's only one package in this example

This should be go-fuzz-build -libfuzzer -o fuzzer.a . or ``go-fuzz-build -libfuzzer -o fuzzer.a github.com/fuzzitdev/example-go`

I can make a PR.

@yevgenypats
Copy link
Collaborator

@yevgenypats yevgenypats commented Aug 2, 2019

Sounds right. will be happy for a PR.

yevgenypats added a commit that referenced this issue Aug 2, 2019
restructure example and tweak readme (fixes issue #3; fixes issue #4)
@yevgenypats
Copy link
Collaborator

@yevgenypats yevgenypats commented Aug 2, 2019

Closing as this was merged.

@yevgenypats yevgenypats closed this Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.