config

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileConfig

type FileConfig struct {
	Extensions      []string `yaml:"extensions"`
	Excludes        []string `yaml:"excludes"`
	Verbose         bool     `yaml:"verbose"`
	Format          string   `yaml:"format"`            // Add format field: "markdown", "xml", "json"
	Debug           bool     `yaml:"debug"`             // Add debug field
	GitIgnore       bool     `yaml:"gitignore"`         // Use .gitignore patterns
	UseDefaultRules bool     `yaml:"use-default-rules"` // Use default filtering rules (true by default)
}

FileConfig represents the structure of .promptext.yml

func LoadConfig

func LoadConfig(dirPath string) (*FileConfig, error)

LoadConfig attempts to load and parse the .promptext.yml file

func (*FileConfig) MergeWithFlags

func (fc *FileConfig) MergeWithFlags(flagExt, flagExclude string, flagVerbose bool, flagDebug bool, flagGitIgnore *bool, flagUseDefaultRules *bool) (extensions []string, excludes []string, verbose bool, debug bool, useGitIgnore bool, useDefaultRules bool)

MergeWithFlags merges the file config with command line flags Command line flags take precedence over file config

Jump to

Keyboard shortcuts

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