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

Unified error reporting in internal/vfs package #15

Merged
merged 3 commits into from
Jul 26, 2018

Conversation

urso
Copy link

@urso urso commented Jul 25, 2018

  • introduce common error type and error codes
  • map OS specific errors to vfs common error codes in osfs layer

- introduce common error type and error codes
- map OS specific errors to vfs common error codes in osfs layer
@urso urso added the review label Jul 25, 2018
@urso urso mentioned this pull request Jul 25, 2018
4 tasks
@urso urso requested review from ph and kvch July 25, 2018 15:41
Copy link

@ph ph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, small comment concerning the header of the generated file.

@@ -0,0 +1,16 @@
// Code generated by "stringer -type=Kind -linecomment=true"; DO NOT EDIT.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know its a generated file but we might want to have the license header added.

Copy link
Author

@urso urso Jul 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I updated the go:generate command to run beatsfmt on the generated file. Not perfect, but it's the a good way to ensure I don't drop the license header in another PR, as I tend to run go:generate from time to time.

beatsfmt puts the license header at the top. The side effect of this is that github does not detect the Code generated by comment anymore -> diff will be shown.

With this change the go:generate hint is:

//go:generate stringer -type=Kind -linecomment=true
//go:generate beatsfmt -w kind_string.go

@kvch kvch merged commit 8b8b138 into elastic:master Jul 26, 2018
@urso urso deleted the vfs-errors branch April 17, 2019 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants