config

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Package config provides scope-based configuration file resolution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMonorepoRoot

func IsMonorepoRoot(dir string) bool

IsMonorepoRoot detects monorepo by checking for workspace indicators.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache() *Cache

func (*Cache) Clear

func (c *Cache) Clear()

func (*Cache) Get

func (c *Cache) Get(dir string, patterns []string) (string, bool)

func (*Cache) Set

func (c *Cache) Set(dir string, patterns []string, configPath string)

func (*Cache) Size

func (c *Cache) Size() int

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver(cache *Cache, maxDepth int) *Resolver

func (*Resolver) ResolveConfig

func (r *Resolver) ResolveConfig(filePath string, patterns []string) (string, bool)

ResolveConfig finds the nearest config file by traversing up directories. Stops at project root boundary (go.mod, .git, package.json) + one level for monorepo configs.

Jump to

Keyboard shortcuts

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