Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶ added in v0.2.0
Checker tests file existence by absolute or relative path. It keeps the resolver pure string paths: the cache boundary translates uri.URI to OS paths before calling Exists.
type Option ¶ added in v0.2.0
type Option func(*Resolver)
Option configures a Resolver.
func WithChecker ¶ added in v0.2.0
WithChecker checks existence through checker.
func WithExistsFunc ¶ added in v0.2.0
WithExistsFunc checks existence through exists.
func WithFS ¶ added in v0.2.0
WithFS checks file existence through fsys. Paths are looked up as given; when an absolute path misses, it is retried without the leading slash, so os.DirFS("/") and other relative-keyed trees behave like the real filesystem. resolvertest.Map and fstest.MapFS make tests hermetic.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver resolves include paths for Thrift files. It provides a centralized, pure implementation that can be used by both CLI and LSP components.
func New ¶
New creates a Resolver over the real filesystem, unless an Option overrides existence checks.
func (*Resolver) Candidates ¶ added in v0.1.8
Candidates lists the existing locations of includePath for currentFile, nearest first: the file's directory, then include paths ordered by shared directory prefix with the file's directory, config order breaking ties. More than one location means the include path is shadowed by another include path.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package resolvertest provides an in-memory file tree for include resolution tests, so tests never touch disk.
|
Package resolvertest provides an in-memory file tree for include resolution tests, so tests never touch disk. |