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

catname on the IDS seems to sometimes be an array of strings #113

Merged
merged 7 commits into from
Apr 3, 2024

Conversation

platinummonkey
Copy link
Contributor

A discord issue where on the IDS events the catname field is now sometimes an array of strings

Now:

"catname": [
  "emerging-scan"
],

Before:

"catname": "emerging-p2p",

types.go Outdated Show resolved Hide resolved
types.go Outdated Show resolved Hide resolved
return f.Val
}

func (f FlexString) Fake(faker *gofakeit.Faker) interface{} {
Copy link
Member

Choose a reason for hiding this comment

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

I need to read about what this does. hm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

powers the gofakeit stuff for running the integration tests in unpoller/unpoller

types.go Outdated

func (f FlexString) MarshalJSON() ([]byte, error) {
// array case
if f.Arr != nil && len(f.Arr) > 1 {
Copy link
Member

Choose a reason for hiding this comment

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

This will turn an array into a string if it only has 1 element. Seems fine for now, but something to keep in mind.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

alright added a hint here

@platinummonkey platinummonkey merged commit 7496eff into master Apr 3, 2024
3 checks passed
@platinummonkey platinummonkey deleted the unet-upgrade-8-1-113 branch April 3, 2024 17:03
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