search

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

TODO: Add --name and --note flags to search command to allow searching in notes (currently only searches in item.Name)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileRegexp

func CompileRegexp(pattern string, ignoreCase bool) (*regexp.Regexp, error)

func HighlightMatches

func HighlightMatches(text string, positions []MatchPosition) string

Types

type MatchPosition

type MatchPosition struct {
	Start int `json:"start"`
	End   int `json:"end"`
}

func FindMatches

func FindMatches(text, pattern string, useRegexp, ignoreCase bool) []MatchPosition

type Result

type Result struct {
	ID              string          `json:"id"`
	Name            string          `json:"name"`
	HighlightedName string          `json:"highlighted_name"`
	URL             string          `json:"url"`
	MatchPositions  []MatchPosition `json:"match_positions"`
}

func SearchItems

func SearchItems(items []*workflowy.Item, pattern string, useRegexp, ignoreCase bool) []Result

func (Result) String

func (r Result) String() string

Jump to

Keyboard shortcuts

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