Documentation
¶
Index ¶
- Constants
- func FormatTimestamp() string
- func GenerateOutput(paths []PathInfo, registry *parser.Registry, opts OutputOptions) (string, error)
- func GenerateTree(paths []PathInfo) string
- func IsBinaryFile(path string) (bool, error)
- func WriteOutput(path string, content string) error
- type JSONDocument
- type JSONFile
- type JSONFileOutline
- type JSONSymbol
- type OutputFormat
- type OutputOptions
- type PathInfo
Constants ¶
View Source
const ( OutputFormatDefault = "default" OutputFormatJSON = "json" )
Variables ¶
This section is empty.
Functions ¶
func FormatTimestamp ¶
func FormatTimestamp() string
FormatTimestamp returns a formatted timestamp string
func GenerateOutput ¶
func GenerateOutput(paths []PathInfo, registry *parser.Registry, opts OutputOptions) (string, error)
GenerateOutput creates the complete output string
func GenerateTree ¶
GenerateTree creates a textual representation of the directory structure
func IsBinaryFile ¶
IsBinaryFile determines if a file is binary by checking its contents
func WriteOutput ¶
WriteOutput writes content to a file or stdout
Types ¶
type JSONDocument ¶
type JSONDocument struct {
Timestamp string `json:"timestamp"`
Tree string `json:"tree,omitempty"`
Files []JSONFile `json:"files,omitempty"`
Outlines []JSONFileOutline `json:"outlines,omitempty"`
}
type JSONFileOutline ¶
type JSONFileOutline struct {
Path string `json:"path"`
Symbols []JSONSymbol `json:"symbols,omitempty"`
Errors []string `json:"errors,omitempty"`
}
JSONFileOutline represents the parsed structure of a source file
type JSONSymbol ¶
type JSONSymbol struct {
Type string `json:"type"` // e.g., "function", "class", "interface"
Name string `json:"name"` // Name of the symbol
Signature string `json:"signature,omitempty"` // Full signature for functions/methods
Documentation string `json:"documentation,omitempty"` // Associated documentation
Decorators []string `json:"decorators,omitempty"` // Any decorators/annotations
Children []JSONSymbol `json:"children,omitempty"` // Nested symbols (e.g., methods in a class)
Metadata any `json:"metadata,omitempty"` // Additional language-specific metadata
}
JSONSymbol represents a parsed symbol (function, type, class, etc.)
type OutputFormat ¶
type OutputFormat string
type OutputOptions ¶
type OutputOptions struct {
NoTree bool
NoDump bool
Outline bool
SkipBinary bool
Format OutputFormat
}
Options configures the output generation
Click to show internal directories.
Click to hide internal directories.