Something went wrong. Try again.
Monorepo for Tangled
Something went wrong. Try again.
Go
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748package models
import ( "github.com/bluesky-social/indigo/atproto/syntax" "github.com/sourcegraph/zoekt")
// Result is union type of file/chunk matchtype Result struct { RepoDID syntax.DID File *Result_FileMatch Chunk *Result_ChunkMatch}
type Result_FileMatch struct { FilePath string Branches []string // branch names Commit string // commit id Language string // Ranges are the matched span(s) within FilePath. LineNumber is always 1 for // filename matches; Column is 1-based and in runes. Ranges []zoekt.Range}
type Result_ChunkMatch struct { FilePath string Branches []string // branch names Commit string // commit id Language string // Content is a contiguous run of complete lines that fully contains Ranges. Content string // ContentStartLine is the 1-based line number of Content's first line. ContentStartLine int // Ranges are the matched span(s) within the file. LineNumber/Column are // 1-based, Column is in runes. A Range may span multiple lines. Ranges []zoekt.Range}
// IsFileMatch tells if search result is from file-name matchfunc (r *Result) IsFileMatch() bool { return r.File != nil}
// IsChunkMatch tells if search result is from chunk matchfunc (r *Result) IsChunkMatch() bool { return r.Chunk != nil}