index

package
v0.0.0-...-4c9b914 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddComic

func AddComic(c *xkcd.Comic)

AddComic adds a comic into the current index.

func HasComic

func HasComic(id int) bool

HasComic returns true if a comic with given ID exists in the current index.

func SetPath

func SetPath(p string)

SetPath sets the path of the current index.

Types

type SearchResult

type SearchResult struct {
	ComicNum string
	Score    float64
}

A SearchResult is the association of a comic number and its score for the search.

func Search(query string) []SearchResult

Search performs a full-text search on the current index.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL