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

Depointerizer types #102

Merged
merged 4 commits into from
Jan 22, 2023
Merged

Depointerizer types #102

merged 4 commits into from
Jan 22, 2023

Conversation

spinillos
Copy link
Member

It moves DecoderCompactor from Grafana and create Depointerizer function to remove pointers from the types.

By default, we are going to remove always the pointers in maps and slices but in the rest of the types will be optional. So the user could decide to remove these pointers or not setting NoOptionalPointers in the configuration.

Related: grafana/grok#1

Copy link
Contributor

@sdboyer sdboyer left a comment

Choose a reason for hiding this comment

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

Let's also add some test cases that exercise the depointerizing config options.

return nil, false
}

func DecoderCompactor() dstutil.ApplyFunc {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's unexport this, i don't think there's value in exposing it

Copy link
Member Author

Choose a reason for hiding this comment

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

That's true, thnx

@sdboyer
Copy link
Contributor

sdboyer commented Jan 22, 2023

I'll defer to a follow-up adding test cases to cover these, as we're quite short on time right now and it's not atypical of other things in thema (unfortunately 😭) that they're not tested

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.

None yet

2 participants