index

package
v0.0.0-...-2954126 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEYWORD_EXCLUDE_REGEX = "[^\\w]"

	STORAGE_FILE = "index.csv"
)

Variables

View Source
var (
	ErrMissingIndex   = errors.New("can't find the index file")
	ErrIndexFileIsDir = errors.New("index file is a directory")
)
View Source
var (
	Index = NewIndex(STORAGE_FILE)
)

Functions

func NewIndex

func NewIndex(filename string) *indexType

func ProcessPage

func ProcessPage(page Page)

Types

type IndexItem

type IndexItem struct {
	// FIXME: There might a problem with this:
	// Same page might appear multiple times under one keyword. Though, this might
	// be beneficial for determining how often a word appears...
	URL url.URL
}

type Page

type Page struct {
	URL     url.URL
	Content string
}

Jump to

Keyboard shortcuts

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