🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

github.com/rileyisland/code-challenge-autocomplete

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/rileyisland/code-challenge-autocomplete

v0.0.0-20200625203634-1f3beadaec83
Source
Go
Version published
Created
Source

Code Challenge: Autocomplete Service

A web service using Golang that can return autocomplete suggestions based on word fragments, using a local text file as the data source.

Instructions for Mac

  • Clone the repository using Git to your local filesystem.
  • Using the command line, navigate to the code folder.
  • Run go run main.go.
  • Navigate to http://localhost:9000/autocomplete?term=TERM.
  • Replace "TERM" in the url above with any other matches you would like to autocomplete.

Documentation

Known Issues/TODOs

  • Create a module for matches and move code from main.go into the module for cleanliness purposes
  • Clean more words from the initial word results
    • Visit http://localhost:9000/autocomplete?term=brother: "brother", "brother-" and "brother--" are separate results)
    • Get a list of words for which isNonWord returns true and identify any other caveats that could be added to properly include/exclude characters/words

FAQs

Package last updated on 25 Jun 2020

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