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

RM-27055 added Queue methods: GetItems, GetItem, Search, Clear #163

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nikepan
Copy link

@nikepan nikepan commented Feb 22, 2017

Some additional methods for working with queue.
Thats useful, when you need interact with queue items (send stop signal and clear queue)

  • GetItems - getting all items for scan without removing
  • Search - getting items for whit checker func without removing
  • GetItem - getting item by position
  • Clear - clear queue

@aviary2-wf
Copy link

Raven

Number of Findings: 0

@nikepan nikepan changed the title added Queue methods: GetItems, Getitem, Search, Clear added Queue methods: GetItems, GetItem, Search, Clear Feb 22, 2017
@dustinhiatt-wf
Copy link
Contributor

+1

1 similar comment
@brianshannan-wf
Copy link
Collaborator

+1

@brianshannan-wf
Copy link
Collaborator

You'll need to pull in master to get the build to pass @nikepan

@aviary-wf
Copy link

aviary-wf commented Feb 15, 2018

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on HipChat: InfoSec Forum.

@nikepan
Copy link
Author

nikepan commented Feb 15, 2018

Updated

@rmconsole-wf rmconsole-wf changed the title added Queue methods: GetItems, GetItem, Search, Clear RM-27055 added Queue methods: GetItems, GetItem, Search, Clear Feb 15, 2018
@brianshannan-wf
Copy link
Collaborator

+1

tonylambiris pushed a commit to tonylambiris/go-datastructures that referenced this pull request Apr 14, 2018
tonylambiris pushed a commit to tonylambiris/go-datastructures that referenced this pull request Jul 26, 2018
@dustinhiatt-wf
Copy link
Contributor

+1


returnItems := make([]interface{}, 0, length)
for _, item := range *items {
if !checker(item) {

Choose a reason for hiding this comment

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

to me it seems unintuitive that this would return objects that do not pass checker, I'd expect the opposite behavior

return nil, false
}

// GetItems returns items in this queue.

Choose a reason for hiding this comment

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

Comment doesn't seem to define the exact behavior.

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.

7 participants