Documentation
¶
Overview ¶
vim:ts=4:sw=4:noexpandtab
vim:ts=4:sw=4:noexpandtab
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenTimingFiles ¶
func OpenTimingFiles() (err error)
func RewriteQuery ¶
Parses the querystring (q= parameter) and moves special tokens such as "lang:c" from the querystring into separate arguments.
Types ¶
type Match ¶
type Match struct { // These members are filled in by the source backend. // NB: I would love to use dcs/regexp.Match as an anonymous struct here, // but encoding/json has a bug: It ignores anonymous struct fields when // decoding/encoding (it’s documented :-/). Path string Line int Ctxp2 string Ctxp1 string Context string Ctxn1 string Ctxn2 string Ranking float32 // These are filled in by Prettify() SourcePackage string RelativePath string // The ranking of the ResultPath corresponding to Path PathRanking float32 // The combined Ranking * PathRanking FinalRanking float32 }
This Match data structure is filled when receiving the match from the source backend. It is then enriched with the ranking of the corresponding path and displayed to the user.
type SearchResults ¶
type SearchResults []Match
This type implements sort.Interface so that we can sort it by rank.
func (SearchResults) Len ¶
func (s SearchResults) Len() int
func (SearchResults) Less ¶
func (s SearchResults) Less(i, j int) bool
func (SearchResults) Swap ¶
func (s SearchResults) Swap(i, j int)
type SourceReply ¶
Click to show internal directories.
Click to hide internal directories.