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

Using MemProfileAllocs sample in the readme #55

Closed
bitcodr opened this issue Jun 12, 2020 · 1 comment
Closed

Using MemProfileAllocs sample in the readme #55

bitcodr opened this issue Jun 12, 2020 · 1 comment

Comments

@bitcodr
Copy link

bitcodr commented Jun 12, 2020

In the readme, there is an example which is shows how to use profile.MemProfileAllocs in the Start function, but the sample is wrong and you'll get an error like

cannot use profile.MemProfileAllocs (type func() func(*profile.Profile)) as type func(*profile.Profile) in argument to profile.Start

And the readme should be
p := profile.Start(profile.MemProfileAllocs(), profile.ProfilePath("."), profile.NoShutdownHook)

So if do you confirm it's wrong can I send a PR to fix the readme or the codebase?

@davecheney
Copy link
Member

Opps. Thanks for spotting that. Fix coming up

@bitcodr bitcodr changed the title Usgin MemProfileAllocs sample in the readme Using MemProfileAllocs sample in the readme May 6, 2021
daheige pushed a commit to daheige/profile that referenced this issue May 6, 2021
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

2 participants