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

Skipping check per struct #13

Closed
bentcoder opened this issue Nov 17, 2019 · 0 comments
Closed

Skipping check per struct #13

bentcoder opened this issue Nov 17, 2019 · 0 comments

Comments

@bentcoder
Copy link

Hi,

I am wondering if I can explicitly skip running maligned check on any given struct rather than globally checking either all or none?

Regards

This is how I wish to return JSON response

{
   "id": 1,
   "name": "hello",
   "is_active": true,
   "created_at": "2019-01-01"
}
struct{
	ID       	uint16
	Name     	string
	IsActive 	bool
	CreatedAt	string
}

However, it is not possible because struct is not maligned and I have to malign it and the response looks odd.

struct{
	Name     	string
	CreatedAt	string
	ID       	uint16
	IsActive 	bool
}
{
   "name": "hello",
   "created_at": "2019-01-01",
   "id": 1,
   "is_active": true
}

Some annotation solution like this, maybe!

// @skip: maligned
struct{
	ID       	uint16
	Name     	string
	IsActive 	bool
	CreatedAt	string
}
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