mine

package
v0.0.0-...-2493bd8 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxFileBytes  = 256 * 1024
	DefaultMaxChunkChars = 3000
)

Variables

This section is empty.

Functions

func Discover

func Discover(opts Options) ([]File, string, []Skip, error)

Types

type Chunk

type Chunk struct {
	SourcePath string
	SourceRef  string
	Content    string
	Index      int
	StartLine  int
	EndLine    int
	FileHash   string
	FileSize   int64
	FileMTime  string
}

func ChunkText

func ChunkText(sourcePath, text string, maxChars int) []Chunk

func ChunksForFile

func ChunksForFile(file File, opts Options) ([]Chunk, error)

type File

type File struct {
	Path    string
	Rel     string
	Size    int64
	ModTime string
}

type Options

type Options struct {
	Path                     string
	SourceRoot               string
	IncludeHidden            bool
	IncludeHiddenOperational bool
	FollowRepoSymlinks       bool
	PolicyConfigured         bool
	IncludePaths             []string
	ExcludePaths             []string
	MaxFileBytes             int64
	MaxChunkChars            int
	MaxChunks                int
}

type Result

type Result struct {
	Root         string
	FilesScanned int
	FilesSkipped int
	Chunks       []Chunk
	Skipped      []Skip
}

func Collect

func Collect(opts Options) (Result, error)

type Skip

type Skip struct {
	Path   string `json:"path"`
	Reason string `json:"reason"`
}

Jump to

Keyboard shortcuts

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