config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 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
}

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) (extensions []string, excludes []string, verbose bool, debug bool, useGitIgnore 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