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

Added a crawler to extract NtStatus definitions from MSDN #9

Closed
wants to merge 2 commits into from
Closed

Added a crawler to extract NtStatus definitions from MSDN #9

wants to merge 2 commits into from

Conversation

oec
Copy link
Contributor

@oec oec commented Nov 21, 2017

Hi,

I wrote a simple crawler based on github.com/PuerkitoBio/goquery to extract the NtStatus codes from https://msdn.microsoft.com/en-us/library/cc704588.aspx. In ntstatus.go, a go:generate now calls statuscrawler which generates ntstatus_generated.go.

ntstatus_generated.go contains the consts as well as the String() method for NtStatus to derive the STATUS_* name for a given NtStatus (via a map[NtStatus]string{}. The stringer-tool, for some reason, did not provide a properly generated go-file).

It adds a timestamp to the generated file, based on the <meta name="ms.sitever" content="...">-tag in the HTML-file.

Hope this is what you had in mind with your "FIXME"-comment in ntstatus.go.

Cheers,
Özgür

@oec oec closed this Nov 21, 2017
@oec oec deleted the statuscrawler branch November 21, 2017 23:06
@oec
Copy link
Contributor Author

oec commented Nov 21, 2017

Sorry about that, the commit to my branch had skipped files.

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

Successfully merging this pull request may close these issues.

1 participant