Algorithm is the instance of suffix tree algorithm.
var Algorithm *algorithm.AlgImpl // nolint
Search contains the current substring searched for.
var Search = "" // nolint
Text contains the uploaded text string.
var Text = "" // nolint
func GetFormattedText(expr string) template.HTML
GetFormattedText returns the text with highlighted substring that was searched for. Uses the suffix tree algorithm to find the substrings. Highlighting is made with special HTML tag.
func OnUserEntersHomePage(w http.ResponseWriter, r *http.Request)
OnUserEntersHomePage is the endpoint hit when opening the Web-UI via GET. Responds with HTML template for Web-UI.
func OnUserError(w http.ResponseWriter, r *http.Request)
OnUserError is the endpoint hit when an error occurs.
func OnUserSearch(w http.ResponseWriter, r *http.Request)
OnUserSearch is the endpoint hit when searching for a substring via POST.
func OnUserUploadsFile(w http.ResponseWriter, r *http.Request)
OnUserUploadsFile is the endpoint hit when uploading a text file via POST.
func RunWebserver()
RunWebserver runs the web server.
type PageData struct { Search string ShowText bool Text template.HTML }