you might fare better with implementing this using...
# general
g
you might fare better with implementing this using osquery-go