input

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedExtensions = []string{
	".md",
	".yaml",
	".yml",
	".json",
	".txt",
}

SupportedExtensions lists file extensions to include as input

Functions

This section is empty.

Types

type Input

type Input struct {
	// IsDirectory indicates if input was a directory
	IsDirectory bool
	// Path is the original input path (file or directory)
	Path string
	// Files contains all discovered input files (absolute paths)
	Files []string
	// PrimaryFile is the main input file (first .md file or first file)
	PrimaryFile string
}

Input represents discovered input files

func Discover

func Discover(path string) (*Input, error)

Discover scans the input path and returns discovered input files If path is a file, returns that single file If path is a directory, scans for supported file types

func (*Input) RelativePaths

func (i *Input) RelativePaths() []string

RelativePaths returns file paths relative to the input directory

func (*Input) Summary

func (i *Input) Summary() string

Summary returns a human-readable summary of discovered inputs

Jump to

Keyboard shortcuts

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