Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/shawnohare/gossip

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/shawnohare/gossip

  • v2.0.0+incompatible
  • Source
  • Go
  • Socket score

Version published
Created
Source

gossip (go search parser)

Circle CI GoDoc

The gossip package provides the ability to parse raw text queries using a simple DSL into a tree consisting of nodes that are phrases or subqueries together with modal verbs. For example:

package main

import (
  "log"

  "github.com/shawnohare/gossip"
)

func main() {
  queryText := `"data science", "machine learning", -hype`
  var root *gossip.Node
  root, _ = gossip.Parse(queryText)
  log.Printf("The root has %d children.", len(root.Children()))
}

Here, the root node contains three children: one for each of the phrases "data science", "machine learning", and "hype". The "hype" term is modified by the modal verb "must not", represented in the search query by a minus sign.

FAQs

Package last updated on 08 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc